James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // This file is auto-generated from |
| 6 | // gpu/command_buffer/build_gles2_cmd_buffer.py |
| 7 | // It's formatted by clang-format using chromium coding style: |
| 8 | // clang-format -i -style=chromium filename |
| 9 | // DO NOT EDIT! |
| 10 | |
| 11 | #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ |
| 12 | #define GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ |
| 13 | |
| 14 | void ActiveTexture(GLenum texture) { |
| 15 | gles2::cmds::ActiveTexture* c = GetCmdSpace<gles2::cmds::ActiveTexture>(); |
| 16 | if (c) { |
| 17 | c->Init(texture); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | void AttachShader(GLuint program, GLuint shader) { |
| 22 | gles2::cmds::AttachShader* c = GetCmdSpace<gles2::cmds::AttachShader>(); |
| 23 | if (c) { |
| 24 | c->Init(program, shader); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | void BindAttribLocationBucket(GLuint program, |
| 29 | GLuint index, |
| 30 | uint32_t name_bucket_id) { |
| 31 | gles2::cmds::BindAttribLocationBucket* c = |
| 32 | GetCmdSpace<gles2::cmds::BindAttribLocationBucket>(); |
| 33 | if (c) { |
| 34 | c->Init(program, index, name_bucket_id); |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | void BindBuffer(GLenum target, GLuint buffer) { |
| 39 | gles2::cmds::BindBuffer* c = GetCmdSpace<gles2::cmds::BindBuffer>(); |
| 40 | if (c) { |
| 41 | c->Init(target, buffer); |
| 42 | } |
| 43 | } |
| 44 | |
James Robinson | d753aca | 2015-01-12 13:07:20 -0800 | [diff] [blame] | 45 | void BindBufferBase(GLenum target, GLuint index, GLuint buffer) { |
| 46 | gles2::cmds::BindBufferBase* c = GetCmdSpace<gles2::cmds::BindBufferBase>(); |
| 47 | if (c) { |
| 48 | c->Init(target, index, buffer); |
| 49 | } |
| 50 | } |
| 51 | |
Etienne Membrives | 18cca09 | 2015-01-14 00:46:18 +0100 | [diff] [blame] | 52 | void BindBufferRange(GLenum target, |
| 53 | GLuint index, |
| 54 | GLuint buffer, |
| 55 | GLintptr offset, |
| 56 | GLsizeiptr size) { |
| 57 | gles2::cmds::BindBufferRange* c = GetCmdSpace<gles2::cmds::BindBufferRange>(); |
| 58 | if (c) { |
| 59 | c->Init(target, index, buffer, offset, size); |
| 60 | } |
| 61 | } |
| 62 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 63 | void BindFramebuffer(GLenum target, GLuint framebuffer) { |
| 64 | gles2::cmds::BindFramebuffer* c = GetCmdSpace<gles2::cmds::BindFramebuffer>(); |
| 65 | if (c) { |
| 66 | c->Init(target, framebuffer); |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | void BindRenderbuffer(GLenum target, GLuint renderbuffer) { |
| 71 | gles2::cmds::BindRenderbuffer* c = |
| 72 | GetCmdSpace<gles2::cmds::BindRenderbuffer>(); |
| 73 | if (c) { |
| 74 | c->Init(target, renderbuffer); |
| 75 | } |
| 76 | } |
| 77 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 78 | void BindSampler(GLuint unit, GLuint sampler) { |
| 79 | gles2::cmds::BindSampler* c = GetCmdSpace<gles2::cmds::BindSampler>(); |
| 80 | if (c) { |
| 81 | c->Init(unit, sampler); |
| 82 | } |
| 83 | } |
| 84 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 85 | void BindTexture(GLenum target, GLuint texture) { |
| 86 | gles2::cmds::BindTexture* c = GetCmdSpace<gles2::cmds::BindTexture>(); |
| 87 | if (c) { |
| 88 | c->Init(target, texture); |
| 89 | } |
| 90 | } |
| 91 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 92 | void BindTransformFeedback(GLenum target, GLuint transformfeedback) { |
| 93 | gles2::cmds::BindTransformFeedback* c = |
| 94 | GetCmdSpace<gles2::cmds::BindTransformFeedback>(); |
| 95 | if (c) { |
| 96 | c->Init(target, transformfeedback); |
| 97 | } |
| 98 | } |
| 99 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 100 | void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { |
| 101 | gles2::cmds::BlendColor* c = GetCmdSpace<gles2::cmds::BlendColor>(); |
| 102 | if (c) { |
| 103 | c->Init(red, green, blue, alpha); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | void BlendEquation(GLenum mode) { |
| 108 | gles2::cmds::BlendEquation* c = GetCmdSpace<gles2::cmds::BlendEquation>(); |
| 109 | if (c) { |
| 110 | c->Init(mode); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { |
| 115 | gles2::cmds::BlendEquationSeparate* c = |
| 116 | GetCmdSpace<gles2::cmds::BlendEquationSeparate>(); |
| 117 | if (c) { |
| 118 | c->Init(modeRGB, modeAlpha); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | void BlendFunc(GLenum sfactor, GLenum dfactor) { |
| 123 | gles2::cmds::BlendFunc* c = GetCmdSpace<gles2::cmds::BlendFunc>(); |
| 124 | if (c) { |
| 125 | c->Init(sfactor, dfactor); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | void BlendFuncSeparate(GLenum srcRGB, |
| 130 | GLenum dstRGB, |
| 131 | GLenum srcAlpha, |
| 132 | GLenum dstAlpha) { |
| 133 | gles2::cmds::BlendFuncSeparate* c = |
| 134 | GetCmdSpace<gles2::cmds::BlendFuncSeparate>(); |
| 135 | if (c) { |
| 136 | c->Init(srcRGB, dstRGB, srcAlpha, dstAlpha); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | void BufferData(GLenum target, |
| 141 | GLsizeiptr size, |
| 142 | uint32_t data_shm_id, |
| 143 | uint32_t data_shm_offset, |
| 144 | GLenum usage) { |
| 145 | gles2::cmds::BufferData* c = GetCmdSpace<gles2::cmds::BufferData>(); |
| 146 | if (c) { |
| 147 | c->Init(target, size, data_shm_id, data_shm_offset, usage); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | void BufferSubData(GLenum target, |
| 152 | GLintptr offset, |
| 153 | GLsizeiptr size, |
| 154 | uint32_t data_shm_id, |
| 155 | uint32_t data_shm_offset) { |
| 156 | gles2::cmds::BufferSubData* c = GetCmdSpace<gles2::cmds::BufferSubData>(); |
| 157 | if (c) { |
| 158 | c->Init(target, offset, size, data_shm_id, data_shm_offset); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | void CheckFramebufferStatus(GLenum target, |
| 163 | uint32_t result_shm_id, |
| 164 | uint32_t result_shm_offset) { |
| 165 | gles2::cmds::CheckFramebufferStatus* c = |
| 166 | GetCmdSpace<gles2::cmds::CheckFramebufferStatus>(); |
| 167 | if (c) { |
| 168 | c->Init(target, result_shm_id, result_shm_offset); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | void Clear(GLbitfield mask) { |
| 173 | gles2::cmds::Clear* c = GetCmdSpace<gles2::cmds::Clear>(); |
| 174 | if (c) { |
| 175 | c->Init(mask); |
| 176 | } |
| 177 | } |
| 178 | |
James Robinson | 5e66a79 | 2015-01-21 17:02:08 -0800 | [diff] [blame] | 179 | void ClearBufferfi(GLenum buffer, |
| 180 | GLint drawbuffers, |
| 181 | GLfloat depth, |
| 182 | GLint stencil) { |
| 183 | gles2::cmds::ClearBufferfi* c = GetCmdSpace<gles2::cmds::ClearBufferfi>(); |
| 184 | if (c) { |
| 185 | c->Init(buffer, drawbuffers, depth, stencil); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | void ClearBufferfvImmediate(GLenum buffer, |
| 190 | GLint drawbuffers, |
| 191 | const GLfloat* value) { |
| 192 | const uint32_t size = gles2::cmds::ClearBufferfvImmediate::ComputeSize(); |
| 193 | gles2::cmds::ClearBufferfvImmediate* c = |
| 194 | GetImmediateCmdSpaceTotalSize<gles2::cmds::ClearBufferfvImmediate>(size); |
| 195 | if (c) { |
| 196 | c->Init(buffer, drawbuffers, value); |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | void ClearBufferivImmediate(GLenum buffer, |
| 201 | GLint drawbuffers, |
| 202 | const GLint* value) { |
| 203 | const uint32_t size = gles2::cmds::ClearBufferivImmediate::ComputeSize(); |
| 204 | gles2::cmds::ClearBufferivImmediate* c = |
| 205 | GetImmediateCmdSpaceTotalSize<gles2::cmds::ClearBufferivImmediate>(size); |
| 206 | if (c) { |
| 207 | c->Init(buffer, drawbuffers, value); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | void ClearBufferuivImmediate(GLenum buffer, |
| 212 | GLint drawbuffers, |
| 213 | const GLuint* value) { |
| 214 | const uint32_t size = gles2::cmds::ClearBufferuivImmediate::ComputeSize(); |
| 215 | gles2::cmds::ClearBufferuivImmediate* c = |
| 216 | GetImmediateCmdSpaceTotalSize<gles2::cmds::ClearBufferuivImmediate>(size); |
| 217 | if (c) { |
| 218 | c->Init(buffer, drawbuffers, value); |
| 219 | } |
| 220 | } |
| 221 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 222 | void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { |
| 223 | gles2::cmds::ClearColor* c = GetCmdSpace<gles2::cmds::ClearColor>(); |
| 224 | if (c) { |
| 225 | c->Init(red, green, blue, alpha); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | void ClearDepthf(GLclampf depth) { |
| 230 | gles2::cmds::ClearDepthf* c = GetCmdSpace<gles2::cmds::ClearDepthf>(); |
| 231 | if (c) { |
| 232 | c->Init(depth); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | void ClearStencil(GLint s) { |
| 237 | gles2::cmds::ClearStencil* c = GetCmdSpace<gles2::cmds::ClearStencil>(); |
| 238 | if (c) { |
| 239 | c->Init(s); |
| 240 | } |
| 241 | } |
| 242 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 243 | void ClientWaitSync(GLuint sync, |
| 244 | GLbitfield flags, |
| 245 | GLuint timeout_0, |
| 246 | GLuint timeout_1, |
| 247 | uint32_t result_shm_id, |
| 248 | uint32_t result_shm_offset) { |
| 249 | gles2::cmds::ClientWaitSync* c = GetCmdSpace<gles2::cmds::ClientWaitSync>(); |
| 250 | if (c) { |
| 251 | c->Init(sync, flags, timeout_0, timeout_1, result_shm_id, |
| 252 | result_shm_offset); |
| 253 | } |
| 254 | } |
| 255 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 256 | void ColorMask(GLboolean red, |
| 257 | GLboolean green, |
| 258 | GLboolean blue, |
| 259 | GLboolean alpha) { |
| 260 | gles2::cmds::ColorMask* c = GetCmdSpace<gles2::cmds::ColorMask>(); |
| 261 | if (c) { |
| 262 | c->Init(red, green, blue, alpha); |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | void CompileShader(GLuint shader) { |
| 267 | gles2::cmds::CompileShader* c = GetCmdSpace<gles2::cmds::CompileShader>(); |
| 268 | if (c) { |
| 269 | c->Init(shader); |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | void CompressedTexImage2DBucket(GLenum target, |
| 274 | GLint level, |
| 275 | GLenum internalformat, |
| 276 | GLsizei width, |
| 277 | GLsizei height, |
| 278 | GLuint bucket_id) { |
| 279 | gles2::cmds::CompressedTexImage2DBucket* c = |
| 280 | GetCmdSpace<gles2::cmds::CompressedTexImage2DBucket>(); |
| 281 | if (c) { |
| 282 | c->Init(target, level, internalformat, width, height, bucket_id); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | void CompressedTexImage2D(GLenum target, |
| 287 | GLint level, |
| 288 | GLenum internalformat, |
| 289 | GLsizei width, |
| 290 | GLsizei height, |
| 291 | GLsizei imageSize, |
| 292 | uint32_t data_shm_id, |
| 293 | uint32_t data_shm_offset) { |
| 294 | gles2::cmds::CompressedTexImage2D* c = |
| 295 | GetCmdSpace<gles2::cmds::CompressedTexImage2D>(); |
| 296 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 297 | c->Init(target, level, internalformat, width, height, imageSize, |
| 298 | data_shm_id, data_shm_offset); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 299 | } |
| 300 | } |
| 301 | |
| 302 | void CompressedTexSubImage2DBucket(GLenum target, |
| 303 | GLint level, |
| 304 | GLint xoffset, |
| 305 | GLint yoffset, |
| 306 | GLsizei width, |
| 307 | GLsizei height, |
| 308 | GLenum format, |
| 309 | GLuint bucket_id) { |
| 310 | gles2::cmds::CompressedTexSubImage2DBucket* c = |
| 311 | GetCmdSpace<gles2::cmds::CompressedTexSubImage2DBucket>(); |
| 312 | if (c) { |
| 313 | c->Init(target, level, xoffset, yoffset, width, height, format, bucket_id); |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | void CompressedTexSubImage2D(GLenum target, |
| 318 | GLint level, |
| 319 | GLint xoffset, |
| 320 | GLint yoffset, |
| 321 | GLsizei width, |
| 322 | GLsizei height, |
| 323 | GLenum format, |
| 324 | GLsizei imageSize, |
| 325 | uint32_t data_shm_id, |
| 326 | uint32_t data_shm_offset) { |
| 327 | gles2::cmds::CompressedTexSubImage2D* c = |
| 328 | GetCmdSpace<gles2::cmds::CompressedTexSubImage2D>(); |
| 329 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 330 | c->Init(target, level, xoffset, yoffset, width, height, format, imageSize, |
| 331 | data_shm_id, data_shm_offset); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 332 | } |
| 333 | } |
| 334 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 335 | void CopyBufferSubData(GLenum readtarget, |
| 336 | GLenum writetarget, |
| 337 | GLintptr readoffset, |
| 338 | GLintptr writeoffset, |
| 339 | GLsizeiptr size) { |
| 340 | gles2::cmds::CopyBufferSubData* c = |
| 341 | GetCmdSpace<gles2::cmds::CopyBufferSubData>(); |
| 342 | if (c) { |
| 343 | c->Init(readtarget, writetarget, readoffset, writeoffset, size); |
| 344 | } |
| 345 | } |
| 346 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 347 | void CopyTexImage2D(GLenum target, |
| 348 | GLint level, |
| 349 | GLenum internalformat, |
| 350 | GLint x, |
| 351 | GLint y, |
| 352 | GLsizei width, |
| 353 | GLsizei height) { |
| 354 | gles2::cmds::CopyTexImage2D* c = GetCmdSpace<gles2::cmds::CopyTexImage2D>(); |
| 355 | if (c) { |
| 356 | c->Init(target, level, internalformat, x, y, width, height); |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | void CopyTexSubImage2D(GLenum target, |
| 361 | GLint level, |
| 362 | GLint xoffset, |
| 363 | GLint yoffset, |
| 364 | GLint x, |
| 365 | GLint y, |
| 366 | GLsizei width, |
| 367 | GLsizei height) { |
| 368 | gles2::cmds::CopyTexSubImage2D* c = |
| 369 | GetCmdSpace<gles2::cmds::CopyTexSubImage2D>(); |
| 370 | if (c) { |
| 371 | c->Init(target, level, xoffset, yoffset, x, y, width, height); |
| 372 | } |
| 373 | } |
| 374 | |
Benjamin Lerman | cdfc88d | 2015-02-03 14:35:12 +0100 | [diff] [blame] | 375 | void CopyTexSubImage3D(GLenum target, |
| 376 | GLint level, |
| 377 | GLint xoffset, |
| 378 | GLint yoffset, |
| 379 | GLint zoffset, |
| 380 | GLint x, |
| 381 | GLint y, |
| 382 | GLsizei width, |
| 383 | GLsizei height) { |
| 384 | gles2::cmds::CopyTexSubImage3D* c = |
| 385 | GetCmdSpace<gles2::cmds::CopyTexSubImage3D>(); |
| 386 | if (c) { |
| 387 | c->Init(target, level, xoffset, yoffset, zoffset, x, y, width, height); |
| 388 | } |
| 389 | } |
| 390 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 391 | void CreateProgram(uint32_t client_id) { |
| 392 | gles2::cmds::CreateProgram* c = GetCmdSpace<gles2::cmds::CreateProgram>(); |
| 393 | if (c) { |
| 394 | c->Init(client_id); |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | void CreateShader(GLenum type, uint32_t client_id) { |
| 399 | gles2::cmds::CreateShader* c = GetCmdSpace<gles2::cmds::CreateShader>(); |
| 400 | if (c) { |
| 401 | c->Init(type, client_id); |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | void CullFace(GLenum mode) { |
| 406 | gles2::cmds::CullFace* c = GetCmdSpace<gles2::cmds::CullFace>(); |
| 407 | if (c) { |
| 408 | c->Init(mode); |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | void DeleteBuffersImmediate(GLsizei n, const GLuint* buffers) { |
| 413 | const uint32_t size = gles2::cmds::DeleteBuffersImmediate::ComputeSize(n); |
| 414 | gles2::cmds::DeleteBuffersImmediate* c = |
| 415 | GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteBuffersImmediate>(size); |
| 416 | if (c) { |
| 417 | c->Init(n, buffers); |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | void DeleteFramebuffersImmediate(GLsizei n, const GLuint* framebuffers) { |
| 422 | const uint32_t size = |
| 423 | gles2::cmds::DeleteFramebuffersImmediate::ComputeSize(n); |
| 424 | gles2::cmds::DeleteFramebuffersImmediate* c = |
| 425 | GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteFramebuffersImmediate>( |
| 426 | size); |
| 427 | if (c) { |
| 428 | c->Init(n, framebuffers); |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | void DeleteProgram(GLuint program) { |
| 433 | gles2::cmds::DeleteProgram* c = GetCmdSpace<gles2::cmds::DeleteProgram>(); |
| 434 | if (c) { |
| 435 | c->Init(program); |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | void DeleteRenderbuffersImmediate(GLsizei n, const GLuint* renderbuffers) { |
| 440 | const uint32_t size = |
| 441 | gles2::cmds::DeleteRenderbuffersImmediate::ComputeSize(n); |
| 442 | gles2::cmds::DeleteRenderbuffersImmediate* c = |
| 443 | GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteRenderbuffersImmediate>( |
| 444 | size); |
| 445 | if (c) { |
| 446 | c->Init(n, renderbuffers); |
| 447 | } |
| 448 | } |
| 449 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 450 | void DeleteSamplersImmediate(GLsizei n, const GLuint* samplers) { |
| 451 | const uint32_t size = gles2::cmds::DeleteSamplersImmediate::ComputeSize(n); |
| 452 | gles2::cmds::DeleteSamplersImmediate* c = |
| 453 | GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteSamplersImmediate>(size); |
| 454 | if (c) { |
| 455 | c->Init(n, samplers); |
| 456 | } |
| 457 | } |
| 458 | |
Benjamin Lerman | df06e5f | 2015-01-22 13:22:57 +0100 | [diff] [blame] | 459 | void DeleteSync(GLuint sync) { |
| 460 | gles2::cmds::DeleteSync* c = GetCmdSpace<gles2::cmds::DeleteSync>(); |
| 461 | if (c) { |
| 462 | c->Init(sync); |
| 463 | } |
| 464 | } |
| 465 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 466 | void DeleteShader(GLuint shader) { |
| 467 | gles2::cmds::DeleteShader* c = GetCmdSpace<gles2::cmds::DeleteShader>(); |
| 468 | if (c) { |
| 469 | c->Init(shader); |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | void DeleteTexturesImmediate(GLsizei n, const GLuint* textures) { |
| 474 | const uint32_t size = gles2::cmds::DeleteTexturesImmediate::ComputeSize(n); |
| 475 | gles2::cmds::DeleteTexturesImmediate* c = |
| 476 | GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteTexturesImmediate>(size); |
| 477 | if (c) { |
| 478 | c->Init(n, textures); |
| 479 | } |
| 480 | } |
| 481 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 482 | void DeleteTransformFeedbacksImmediate(GLsizei n, const GLuint* ids) { |
| 483 | const uint32_t size = |
| 484 | gles2::cmds::DeleteTransformFeedbacksImmediate::ComputeSize(n); |
| 485 | gles2::cmds::DeleteTransformFeedbacksImmediate* c = |
| 486 | GetImmediateCmdSpaceTotalSize< |
| 487 | gles2::cmds::DeleteTransformFeedbacksImmediate>(size); |
| 488 | if (c) { |
| 489 | c->Init(n, ids); |
| 490 | } |
| 491 | } |
| 492 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 493 | void DepthFunc(GLenum func) { |
| 494 | gles2::cmds::DepthFunc* c = GetCmdSpace<gles2::cmds::DepthFunc>(); |
| 495 | if (c) { |
| 496 | c->Init(func); |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | void DepthMask(GLboolean flag) { |
| 501 | gles2::cmds::DepthMask* c = GetCmdSpace<gles2::cmds::DepthMask>(); |
| 502 | if (c) { |
| 503 | c->Init(flag); |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | void DepthRangef(GLclampf zNear, GLclampf zFar) { |
| 508 | gles2::cmds::DepthRangef* c = GetCmdSpace<gles2::cmds::DepthRangef>(); |
| 509 | if (c) { |
| 510 | c->Init(zNear, zFar); |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | void DetachShader(GLuint program, GLuint shader) { |
| 515 | gles2::cmds::DetachShader* c = GetCmdSpace<gles2::cmds::DetachShader>(); |
| 516 | if (c) { |
| 517 | c->Init(program, shader); |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | void Disable(GLenum cap) { |
| 522 | gles2::cmds::Disable* c = GetCmdSpace<gles2::cmds::Disable>(); |
| 523 | if (c) { |
| 524 | c->Init(cap); |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | void DisableVertexAttribArray(GLuint index) { |
| 529 | gles2::cmds::DisableVertexAttribArray* c = |
| 530 | GetCmdSpace<gles2::cmds::DisableVertexAttribArray>(); |
| 531 | if (c) { |
| 532 | c->Init(index); |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | void DrawArrays(GLenum mode, GLint first, GLsizei count) { |
| 537 | gles2::cmds::DrawArrays* c = GetCmdSpace<gles2::cmds::DrawArrays>(); |
| 538 | if (c) { |
| 539 | c->Init(mode, first, count); |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | void DrawElements(GLenum mode, |
| 544 | GLsizei count, |
| 545 | GLenum type, |
| 546 | GLuint index_offset) { |
| 547 | gles2::cmds::DrawElements* c = GetCmdSpace<gles2::cmds::DrawElements>(); |
| 548 | if (c) { |
| 549 | c->Init(mode, count, type, index_offset); |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | void Enable(GLenum cap) { |
| 554 | gles2::cmds::Enable* c = GetCmdSpace<gles2::cmds::Enable>(); |
| 555 | if (c) { |
| 556 | c->Init(cap); |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | void EnableVertexAttribArray(GLuint index) { |
| 561 | gles2::cmds::EnableVertexAttribArray* c = |
| 562 | GetCmdSpace<gles2::cmds::EnableVertexAttribArray>(); |
| 563 | if (c) { |
| 564 | c->Init(index); |
| 565 | } |
| 566 | } |
| 567 | |
Benjamin Lerman | df06e5f | 2015-01-22 13:22:57 +0100 | [diff] [blame] | 568 | void FenceSync(uint32_t client_id) { |
| 569 | gles2::cmds::FenceSync* c = GetCmdSpace<gles2::cmds::FenceSync>(); |
| 570 | if (c) { |
| 571 | c->Init(client_id); |
| 572 | } |
| 573 | } |
| 574 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 575 | void Finish() { |
| 576 | gles2::cmds::Finish* c = GetCmdSpace<gles2::cmds::Finish>(); |
| 577 | if (c) { |
| 578 | c->Init(); |
| 579 | } |
| 580 | } |
| 581 | |
| 582 | void Flush() { |
| 583 | gles2::cmds::Flush* c = GetCmdSpace<gles2::cmds::Flush>(); |
| 584 | if (c) { |
| 585 | c->Init(); |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | void FramebufferRenderbuffer(GLenum target, |
| 590 | GLenum attachment, |
| 591 | GLenum renderbuffertarget, |
| 592 | GLuint renderbuffer) { |
| 593 | gles2::cmds::FramebufferRenderbuffer* c = |
| 594 | GetCmdSpace<gles2::cmds::FramebufferRenderbuffer>(); |
| 595 | if (c) { |
| 596 | c->Init(target, attachment, renderbuffertarget, renderbuffer); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | void FramebufferTexture2D(GLenum target, |
| 601 | GLenum attachment, |
| 602 | GLenum textarget, |
| 603 | GLuint texture) { |
| 604 | gles2::cmds::FramebufferTexture2D* c = |
| 605 | GetCmdSpace<gles2::cmds::FramebufferTexture2D>(); |
| 606 | if (c) { |
| 607 | c->Init(target, attachment, textarget, texture); |
| 608 | } |
| 609 | } |
| 610 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 611 | void FramebufferTextureLayer(GLenum target, |
| 612 | GLenum attachment, |
| 613 | GLuint texture, |
| 614 | GLint level, |
| 615 | GLint layer) { |
| 616 | gles2::cmds::FramebufferTextureLayer* c = |
| 617 | GetCmdSpace<gles2::cmds::FramebufferTextureLayer>(); |
| 618 | if (c) { |
| 619 | c->Init(target, attachment, texture, level, layer); |
| 620 | } |
| 621 | } |
| 622 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 623 | void FrontFace(GLenum mode) { |
| 624 | gles2::cmds::FrontFace* c = GetCmdSpace<gles2::cmds::FrontFace>(); |
| 625 | if (c) { |
| 626 | c->Init(mode); |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | void GenBuffersImmediate(GLsizei n, GLuint* buffers) { |
| 631 | const uint32_t size = gles2::cmds::GenBuffersImmediate::ComputeSize(n); |
| 632 | gles2::cmds::GenBuffersImmediate* c = |
| 633 | GetImmediateCmdSpaceTotalSize<gles2::cmds::GenBuffersImmediate>(size); |
| 634 | if (c) { |
| 635 | c->Init(n, buffers); |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | void GenerateMipmap(GLenum target) { |
| 640 | gles2::cmds::GenerateMipmap* c = GetCmdSpace<gles2::cmds::GenerateMipmap>(); |
| 641 | if (c) { |
| 642 | c->Init(target); |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | void GenFramebuffersImmediate(GLsizei n, GLuint* framebuffers) { |
| 647 | const uint32_t size = gles2::cmds::GenFramebuffersImmediate::ComputeSize(n); |
| 648 | gles2::cmds::GenFramebuffersImmediate* c = |
| 649 | GetImmediateCmdSpaceTotalSize<gles2::cmds::GenFramebuffersImmediate>( |
| 650 | size); |
| 651 | if (c) { |
| 652 | c->Init(n, framebuffers); |
| 653 | } |
| 654 | } |
| 655 | |
| 656 | void GenRenderbuffersImmediate(GLsizei n, GLuint* renderbuffers) { |
| 657 | const uint32_t size = gles2::cmds::GenRenderbuffersImmediate::ComputeSize(n); |
| 658 | gles2::cmds::GenRenderbuffersImmediate* c = |
| 659 | GetImmediateCmdSpaceTotalSize<gles2::cmds::GenRenderbuffersImmediate>( |
| 660 | size); |
| 661 | if (c) { |
| 662 | c->Init(n, renderbuffers); |
| 663 | } |
| 664 | } |
| 665 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 666 | void GenSamplersImmediate(GLsizei n, GLuint* samplers) { |
| 667 | const uint32_t size = gles2::cmds::GenSamplersImmediate::ComputeSize(n); |
| 668 | gles2::cmds::GenSamplersImmediate* c = |
| 669 | GetImmediateCmdSpaceTotalSize<gles2::cmds::GenSamplersImmediate>(size); |
| 670 | if (c) { |
| 671 | c->Init(n, samplers); |
| 672 | } |
| 673 | } |
| 674 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 675 | void GenTexturesImmediate(GLsizei n, GLuint* textures) { |
| 676 | const uint32_t size = gles2::cmds::GenTexturesImmediate::ComputeSize(n); |
| 677 | gles2::cmds::GenTexturesImmediate* c = |
| 678 | GetImmediateCmdSpaceTotalSize<gles2::cmds::GenTexturesImmediate>(size); |
| 679 | if (c) { |
| 680 | c->Init(n, textures); |
| 681 | } |
| 682 | } |
| 683 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 684 | void GenTransformFeedbacksImmediate(GLsizei n, GLuint* ids) { |
| 685 | const uint32_t size = |
| 686 | gles2::cmds::GenTransformFeedbacksImmediate::ComputeSize(n); |
| 687 | gles2::cmds::GenTransformFeedbacksImmediate* c = |
| 688 | GetImmediateCmdSpaceTotalSize< |
| 689 | gles2::cmds::GenTransformFeedbacksImmediate>(size); |
| 690 | if (c) { |
| 691 | c->Init(n, ids); |
| 692 | } |
| 693 | } |
| 694 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 695 | void GetActiveAttrib(GLuint program, |
| 696 | GLuint index, |
| 697 | uint32_t name_bucket_id, |
| 698 | uint32_t result_shm_id, |
| 699 | uint32_t result_shm_offset) { |
| 700 | gles2::cmds::GetActiveAttrib* c = GetCmdSpace<gles2::cmds::GetActiveAttrib>(); |
| 701 | if (c) { |
| 702 | c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset); |
| 703 | } |
| 704 | } |
| 705 | |
| 706 | void GetActiveUniform(GLuint program, |
| 707 | GLuint index, |
| 708 | uint32_t name_bucket_id, |
| 709 | uint32_t result_shm_id, |
| 710 | uint32_t result_shm_offset) { |
| 711 | gles2::cmds::GetActiveUniform* c = |
| 712 | GetCmdSpace<gles2::cmds::GetActiveUniform>(); |
| 713 | if (c) { |
| 714 | c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset); |
| 715 | } |
| 716 | } |
| 717 | |
Etienne Membrives | 386015a | 2015-02-19 17:27:12 +0100 | [diff] [blame] | 718 | void GetActiveUniformBlockiv(GLuint program, |
| 719 | GLuint index, |
| 720 | GLenum pname, |
| 721 | uint32_t params_shm_id, |
| 722 | uint32_t params_shm_offset) { |
| 723 | gles2::cmds::GetActiveUniformBlockiv* c = |
| 724 | GetCmdSpace<gles2::cmds::GetActiveUniformBlockiv>(); |
| 725 | if (c) { |
| 726 | c->Init(program, index, pname, params_shm_id, params_shm_offset); |
| 727 | } |
| 728 | } |
| 729 | |
James Robinson | 7b766f4 | 2015-02-06 15:14:04 -0800 | [diff] [blame] | 730 | void GetActiveUniformBlockName(GLuint program, |
| 731 | GLuint index, |
| 732 | uint32_t name_bucket_id, |
| 733 | uint32_t result_shm_id, |
| 734 | uint32_t result_shm_offset) { |
| 735 | gles2::cmds::GetActiveUniformBlockName* c = |
| 736 | GetCmdSpace<gles2::cmds::GetActiveUniformBlockName>(); |
| 737 | if (c) { |
| 738 | c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset); |
| 739 | } |
| 740 | } |
| 741 | |
Etienne Membrives | 386015a | 2015-02-19 17:27:12 +0100 | [diff] [blame] | 742 | void GetActiveUniformsiv(GLuint program, |
| 743 | uint32_t indices_bucket_id, |
| 744 | GLenum pname, |
| 745 | uint32_t params_shm_id, |
| 746 | uint32_t params_shm_offset) { |
| 747 | gles2::cmds::GetActiveUniformsiv* c = |
| 748 | GetCmdSpace<gles2::cmds::GetActiveUniformsiv>(); |
| 749 | if (c) { |
| 750 | c->Init(program, indices_bucket_id, pname, params_shm_id, |
| 751 | params_shm_offset); |
| 752 | } |
| 753 | } |
| 754 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 755 | void GetAttachedShaders(GLuint program, |
| 756 | uint32_t result_shm_id, |
| 757 | uint32_t result_shm_offset, |
| 758 | uint32_t result_size) { |
| 759 | gles2::cmds::GetAttachedShaders* c = |
| 760 | GetCmdSpace<gles2::cmds::GetAttachedShaders>(); |
| 761 | if (c) { |
| 762 | c->Init(program, result_shm_id, result_shm_offset, result_size); |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | void GetAttribLocation(GLuint program, |
| 767 | uint32_t name_bucket_id, |
| 768 | uint32_t location_shm_id, |
| 769 | uint32_t location_shm_offset) { |
| 770 | gles2::cmds::GetAttribLocation* c = |
| 771 | GetCmdSpace<gles2::cmds::GetAttribLocation>(); |
| 772 | if (c) { |
| 773 | c->Init(program, name_bucket_id, location_shm_id, location_shm_offset); |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | void GetBooleanv(GLenum pname, |
| 778 | uint32_t params_shm_id, |
| 779 | uint32_t params_shm_offset) { |
| 780 | gles2::cmds::GetBooleanv* c = GetCmdSpace<gles2::cmds::GetBooleanv>(); |
| 781 | if (c) { |
| 782 | c->Init(pname, params_shm_id, params_shm_offset); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | void GetBufferParameteriv(GLenum target, |
| 787 | GLenum pname, |
| 788 | uint32_t params_shm_id, |
| 789 | uint32_t params_shm_offset) { |
| 790 | gles2::cmds::GetBufferParameteriv* c = |
| 791 | GetCmdSpace<gles2::cmds::GetBufferParameteriv>(); |
| 792 | if (c) { |
| 793 | c->Init(target, pname, params_shm_id, params_shm_offset); |
| 794 | } |
| 795 | } |
| 796 | |
| 797 | void GetError(uint32_t result_shm_id, uint32_t result_shm_offset) { |
| 798 | gles2::cmds::GetError* c = GetCmdSpace<gles2::cmds::GetError>(); |
| 799 | if (c) { |
| 800 | c->Init(result_shm_id, result_shm_offset); |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | void GetFloatv(GLenum pname, |
| 805 | uint32_t params_shm_id, |
| 806 | uint32_t params_shm_offset) { |
| 807 | gles2::cmds::GetFloatv* c = GetCmdSpace<gles2::cmds::GetFloatv>(); |
| 808 | if (c) { |
| 809 | c->Init(pname, params_shm_id, params_shm_offset); |
| 810 | } |
| 811 | } |
| 812 | |
Elliot Glaysher | eae4929 | 2015-01-28 10:47:32 -0800 | [diff] [blame] | 813 | void GetFragDataLocation(GLuint program, |
| 814 | uint32_t name_bucket_id, |
| 815 | uint32_t location_shm_id, |
| 816 | uint32_t location_shm_offset) { |
| 817 | gles2::cmds::GetFragDataLocation* c = |
| 818 | GetCmdSpace<gles2::cmds::GetFragDataLocation>(); |
| 819 | if (c) { |
| 820 | c->Init(program, name_bucket_id, location_shm_id, location_shm_offset); |
| 821 | } |
| 822 | } |
| 823 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 824 | void GetFramebufferAttachmentParameteriv(GLenum target, |
| 825 | GLenum attachment, |
| 826 | GLenum pname, |
| 827 | uint32_t params_shm_id, |
| 828 | uint32_t params_shm_offset) { |
| 829 | gles2::cmds::GetFramebufferAttachmentParameteriv* c = |
| 830 | GetCmdSpace<gles2::cmds::GetFramebufferAttachmentParameteriv>(); |
| 831 | if (c) { |
| 832 | c->Init(target, attachment, pname, params_shm_id, params_shm_offset); |
| 833 | } |
| 834 | } |
| 835 | |
| 836 | void GetIntegerv(GLenum pname, |
| 837 | uint32_t params_shm_id, |
| 838 | uint32_t params_shm_offset) { |
| 839 | gles2::cmds::GetIntegerv* c = GetCmdSpace<gles2::cmds::GetIntegerv>(); |
| 840 | if (c) { |
| 841 | c->Init(pname, params_shm_id, params_shm_offset); |
| 842 | } |
| 843 | } |
| 844 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 845 | void GetInternalformativ(GLenum target, |
| 846 | GLenum format, |
| 847 | GLenum pname, |
| 848 | GLsizei bufSize, |
| 849 | uint32_t params_shm_id, |
| 850 | uint32_t params_shm_offset) { |
| 851 | gles2::cmds::GetInternalformativ* c = |
| 852 | GetCmdSpace<gles2::cmds::GetInternalformativ>(); |
| 853 | if (c) { |
| 854 | c->Init(target, format, pname, bufSize, params_shm_id, params_shm_offset); |
| 855 | } |
| 856 | } |
| 857 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 858 | void GetProgramiv(GLuint program, |
| 859 | GLenum pname, |
| 860 | uint32_t params_shm_id, |
| 861 | uint32_t params_shm_offset) { |
| 862 | gles2::cmds::GetProgramiv* c = GetCmdSpace<gles2::cmds::GetProgramiv>(); |
| 863 | if (c) { |
| 864 | c->Init(program, pname, params_shm_id, params_shm_offset); |
| 865 | } |
| 866 | } |
| 867 | |
| 868 | void GetProgramInfoLog(GLuint program, uint32_t bucket_id) { |
| 869 | gles2::cmds::GetProgramInfoLog* c = |
| 870 | GetCmdSpace<gles2::cmds::GetProgramInfoLog>(); |
| 871 | if (c) { |
| 872 | c->Init(program, bucket_id); |
| 873 | } |
| 874 | } |
| 875 | |
| 876 | void GetRenderbufferParameteriv(GLenum target, |
| 877 | GLenum pname, |
| 878 | uint32_t params_shm_id, |
| 879 | uint32_t params_shm_offset) { |
| 880 | gles2::cmds::GetRenderbufferParameteriv* c = |
| 881 | GetCmdSpace<gles2::cmds::GetRenderbufferParameteriv>(); |
| 882 | if (c) { |
| 883 | c->Init(target, pname, params_shm_id, params_shm_offset); |
| 884 | } |
| 885 | } |
| 886 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 887 | void GetSamplerParameterfv(GLuint sampler, |
| 888 | GLenum pname, |
| 889 | uint32_t params_shm_id, |
| 890 | uint32_t params_shm_offset) { |
| 891 | gles2::cmds::GetSamplerParameterfv* c = |
| 892 | GetCmdSpace<gles2::cmds::GetSamplerParameterfv>(); |
| 893 | if (c) { |
| 894 | c->Init(sampler, pname, params_shm_id, params_shm_offset); |
| 895 | } |
| 896 | } |
| 897 | |
| 898 | void GetSamplerParameteriv(GLuint sampler, |
| 899 | GLenum pname, |
| 900 | uint32_t params_shm_id, |
| 901 | uint32_t params_shm_offset) { |
| 902 | gles2::cmds::GetSamplerParameteriv* c = |
| 903 | GetCmdSpace<gles2::cmds::GetSamplerParameteriv>(); |
| 904 | if (c) { |
| 905 | c->Init(sampler, pname, params_shm_id, params_shm_offset); |
| 906 | } |
| 907 | } |
| 908 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 909 | void GetShaderiv(GLuint shader, |
| 910 | GLenum pname, |
| 911 | uint32_t params_shm_id, |
| 912 | uint32_t params_shm_offset) { |
| 913 | gles2::cmds::GetShaderiv* c = GetCmdSpace<gles2::cmds::GetShaderiv>(); |
| 914 | if (c) { |
| 915 | c->Init(shader, pname, params_shm_id, params_shm_offset); |
| 916 | } |
| 917 | } |
| 918 | |
| 919 | void GetShaderInfoLog(GLuint shader, uint32_t bucket_id) { |
| 920 | gles2::cmds::GetShaderInfoLog* c = |
| 921 | GetCmdSpace<gles2::cmds::GetShaderInfoLog>(); |
| 922 | if (c) { |
| 923 | c->Init(shader, bucket_id); |
| 924 | } |
| 925 | } |
| 926 | |
| 927 | void GetShaderPrecisionFormat(GLenum shadertype, |
| 928 | GLenum precisiontype, |
| 929 | uint32_t result_shm_id, |
| 930 | uint32_t result_shm_offset) { |
| 931 | gles2::cmds::GetShaderPrecisionFormat* c = |
| 932 | GetCmdSpace<gles2::cmds::GetShaderPrecisionFormat>(); |
| 933 | if (c) { |
| 934 | c->Init(shadertype, precisiontype, result_shm_id, result_shm_offset); |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | void GetShaderSource(GLuint shader, uint32_t bucket_id) { |
| 939 | gles2::cmds::GetShaderSource* c = GetCmdSpace<gles2::cmds::GetShaderSource>(); |
| 940 | if (c) { |
| 941 | c->Init(shader, bucket_id); |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | void GetString(GLenum name, uint32_t bucket_id) { |
| 946 | gles2::cmds::GetString* c = GetCmdSpace<gles2::cmds::GetString>(); |
| 947 | if (c) { |
| 948 | c->Init(name, bucket_id); |
| 949 | } |
| 950 | } |
| 951 | |
Benjamin Lerman | 507bb1a | 2015-02-26 13:15:17 +0100 | [diff] [blame] | 952 | void GetSynciv(GLuint sync, |
| 953 | GLenum pname, |
| 954 | uint32_t values_shm_id, |
| 955 | uint32_t values_shm_offset) { |
| 956 | gles2::cmds::GetSynciv* c = GetCmdSpace<gles2::cmds::GetSynciv>(); |
| 957 | if (c) { |
| 958 | c->Init(sync, pname, values_shm_id, values_shm_offset); |
| 959 | } |
| 960 | } |
| 961 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 962 | void GetTexParameterfv(GLenum target, |
| 963 | GLenum pname, |
| 964 | uint32_t params_shm_id, |
| 965 | uint32_t params_shm_offset) { |
| 966 | gles2::cmds::GetTexParameterfv* c = |
| 967 | GetCmdSpace<gles2::cmds::GetTexParameterfv>(); |
| 968 | if (c) { |
| 969 | c->Init(target, pname, params_shm_id, params_shm_offset); |
| 970 | } |
| 971 | } |
| 972 | |
| 973 | void GetTexParameteriv(GLenum target, |
| 974 | GLenum pname, |
| 975 | uint32_t params_shm_id, |
| 976 | uint32_t params_shm_offset) { |
| 977 | gles2::cmds::GetTexParameteriv* c = |
| 978 | GetCmdSpace<gles2::cmds::GetTexParameteriv>(); |
| 979 | if (c) { |
| 980 | c->Init(target, pname, params_shm_id, params_shm_offset); |
| 981 | } |
| 982 | } |
| 983 | |
Etienne Membrives | 386015a | 2015-02-19 17:27:12 +0100 | [diff] [blame] | 984 | void GetTransformFeedbackVarying(GLuint program, |
| 985 | GLuint index, |
| 986 | uint32_t name_bucket_id, |
| 987 | uint32_t result_shm_id, |
| 988 | uint32_t result_shm_offset) { |
| 989 | gles2::cmds::GetTransformFeedbackVarying* c = |
| 990 | GetCmdSpace<gles2::cmds::GetTransformFeedbackVarying>(); |
| 991 | if (c) { |
| 992 | c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset); |
| 993 | } |
| 994 | } |
| 995 | |
James Robinson | 7b766f4 | 2015-02-06 15:14:04 -0800 | [diff] [blame] | 996 | void GetUniformBlockIndex(GLuint program, |
| 997 | uint32_t name_bucket_id, |
| 998 | uint32_t index_shm_id, |
| 999 | uint32_t index_shm_offset) { |
| 1000 | gles2::cmds::GetUniformBlockIndex* c = |
| 1001 | GetCmdSpace<gles2::cmds::GetUniformBlockIndex>(); |
| 1002 | if (c) { |
| 1003 | c->Init(program, name_bucket_id, index_shm_id, index_shm_offset); |
| 1004 | } |
| 1005 | } |
| 1006 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1007 | void GetUniformfv(GLuint program, |
| 1008 | GLint location, |
| 1009 | uint32_t params_shm_id, |
| 1010 | uint32_t params_shm_offset) { |
| 1011 | gles2::cmds::GetUniformfv* c = GetCmdSpace<gles2::cmds::GetUniformfv>(); |
| 1012 | if (c) { |
| 1013 | c->Init(program, location, params_shm_id, params_shm_offset); |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | void GetUniformiv(GLuint program, |
| 1018 | GLint location, |
| 1019 | uint32_t params_shm_id, |
| 1020 | uint32_t params_shm_offset) { |
| 1021 | gles2::cmds::GetUniformiv* c = GetCmdSpace<gles2::cmds::GetUniformiv>(); |
| 1022 | if (c) { |
| 1023 | c->Init(program, location, params_shm_id, params_shm_offset); |
| 1024 | } |
| 1025 | } |
| 1026 | |
Etienne Membrives | 386015a | 2015-02-19 17:27:12 +0100 | [diff] [blame] | 1027 | void GetUniformIndices(GLuint program, |
| 1028 | uint32_t names_bucket_id, |
| 1029 | uint32_t indices_shm_id, |
| 1030 | uint32_t indices_shm_offset) { |
| 1031 | gles2::cmds::GetUniformIndices* c = |
| 1032 | GetCmdSpace<gles2::cmds::GetUniformIndices>(); |
| 1033 | if (c) { |
| 1034 | c->Init(program, names_bucket_id, indices_shm_id, indices_shm_offset); |
| 1035 | } |
| 1036 | } |
| 1037 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1038 | void GetUniformLocation(GLuint program, |
| 1039 | uint32_t name_bucket_id, |
| 1040 | uint32_t location_shm_id, |
| 1041 | uint32_t location_shm_offset) { |
| 1042 | gles2::cmds::GetUniformLocation* c = |
| 1043 | GetCmdSpace<gles2::cmds::GetUniformLocation>(); |
| 1044 | if (c) { |
| 1045 | c->Init(program, name_bucket_id, location_shm_id, location_shm_offset); |
| 1046 | } |
| 1047 | } |
| 1048 | |
| 1049 | void GetVertexAttribfv(GLuint index, |
| 1050 | GLenum pname, |
| 1051 | uint32_t params_shm_id, |
| 1052 | uint32_t params_shm_offset) { |
| 1053 | gles2::cmds::GetVertexAttribfv* c = |
| 1054 | GetCmdSpace<gles2::cmds::GetVertexAttribfv>(); |
| 1055 | if (c) { |
| 1056 | c->Init(index, pname, params_shm_id, params_shm_offset); |
| 1057 | } |
| 1058 | } |
| 1059 | |
| 1060 | void GetVertexAttribiv(GLuint index, |
| 1061 | GLenum pname, |
| 1062 | uint32_t params_shm_id, |
| 1063 | uint32_t params_shm_offset) { |
| 1064 | gles2::cmds::GetVertexAttribiv* c = |
| 1065 | GetCmdSpace<gles2::cmds::GetVertexAttribiv>(); |
| 1066 | if (c) { |
| 1067 | c->Init(index, pname, params_shm_id, params_shm_offset); |
| 1068 | } |
| 1069 | } |
| 1070 | |
| 1071 | void GetVertexAttribPointerv(GLuint index, |
| 1072 | GLenum pname, |
| 1073 | uint32_t pointer_shm_id, |
| 1074 | uint32_t pointer_shm_offset) { |
| 1075 | gles2::cmds::GetVertexAttribPointerv* c = |
| 1076 | GetCmdSpace<gles2::cmds::GetVertexAttribPointerv>(); |
| 1077 | if (c) { |
| 1078 | c->Init(index, pname, pointer_shm_id, pointer_shm_offset); |
| 1079 | } |
| 1080 | } |
| 1081 | |
| 1082 | void Hint(GLenum target, GLenum mode) { |
| 1083 | gles2::cmds::Hint* c = GetCmdSpace<gles2::cmds::Hint>(); |
| 1084 | if (c) { |
| 1085 | c->Init(target, mode); |
| 1086 | } |
| 1087 | } |
| 1088 | |
James Robinson | d2015d9 | 2014-12-08 13:45:40 -0800 | [diff] [blame] | 1089 | void InvalidateFramebufferImmediate(GLenum target, |
| 1090 | GLsizei count, |
| 1091 | const GLenum* attachments) { |
| 1092 | const uint32_t size = |
| 1093 | gles2::cmds::InvalidateFramebufferImmediate::ComputeSize(count); |
| 1094 | gles2::cmds::InvalidateFramebufferImmediate* c = |
| 1095 | GetImmediateCmdSpaceTotalSize< |
| 1096 | gles2::cmds::InvalidateFramebufferImmediate>(size); |
| 1097 | if (c) { |
| 1098 | c->Init(target, count, attachments); |
| 1099 | } |
| 1100 | } |
| 1101 | |
| 1102 | void InvalidateSubFramebufferImmediate(GLenum target, |
| 1103 | GLsizei count, |
| 1104 | const GLenum* attachments, |
| 1105 | GLint x, |
| 1106 | GLint y, |
| 1107 | GLsizei width, |
| 1108 | GLsizei height) { |
| 1109 | const uint32_t size = |
| 1110 | gles2::cmds::InvalidateSubFramebufferImmediate::ComputeSize(count); |
| 1111 | gles2::cmds::InvalidateSubFramebufferImmediate* c = |
| 1112 | GetImmediateCmdSpaceTotalSize< |
| 1113 | gles2::cmds::InvalidateSubFramebufferImmediate>(size); |
| 1114 | if (c) { |
| 1115 | c->Init(target, count, attachments, x, y, width, height); |
| 1116 | } |
| 1117 | } |
| 1118 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1119 | void IsBuffer(GLuint buffer, |
| 1120 | uint32_t result_shm_id, |
| 1121 | uint32_t result_shm_offset) { |
| 1122 | gles2::cmds::IsBuffer* c = GetCmdSpace<gles2::cmds::IsBuffer>(); |
| 1123 | if (c) { |
| 1124 | c->Init(buffer, result_shm_id, result_shm_offset); |
| 1125 | } |
| 1126 | } |
| 1127 | |
| 1128 | void IsEnabled(GLenum cap, uint32_t result_shm_id, uint32_t result_shm_offset) { |
| 1129 | gles2::cmds::IsEnabled* c = GetCmdSpace<gles2::cmds::IsEnabled>(); |
| 1130 | if (c) { |
| 1131 | c->Init(cap, result_shm_id, result_shm_offset); |
| 1132 | } |
| 1133 | } |
| 1134 | |
| 1135 | void IsFramebuffer(GLuint framebuffer, |
| 1136 | uint32_t result_shm_id, |
| 1137 | uint32_t result_shm_offset) { |
| 1138 | gles2::cmds::IsFramebuffer* c = GetCmdSpace<gles2::cmds::IsFramebuffer>(); |
| 1139 | if (c) { |
| 1140 | c->Init(framebuffer, result_shm_id, result_shm_offset); |
| 1141 | } |
| 1142 | } |
| 1143 | |
| 1144 | void IsProgram(GLuint program, |
| 1145 | uint32_t result_shm_id, |
| 1146 | uint32_t result_shm_offset) { |
| 1147 | gles2::cmds::IsProgram* c = GetCmdSpace<gles2::cmds::IsProgram>(); |
| 1148 | if (c) { |
| 1149 | c->Init(program, result_shm_id, result_shm_offset); |
| 1150 | } |
| 1151 | } |
| 1152 | |
| 1153 | void IsRenderbuffer(GLuint renderbuffer, |
| 1154 | uint32_t result_shm_id, |
| 1155 | uint32_t result_shm_offset) { |
| 1156 | gles2::cmds::IsRenderbuffer* c = GetCmdSpace<gles2::cmds::IsRenderbuffer>(); |
| 1157 | if (c) { |
| 1158 | c->Init(renderbuffer, result_shm_id, result_shm_offset); |
| 1159 | } |
| 1160 | } |
| 1161 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 1162 | void IsSampler(GLuint sampler, |
| 1163 | uint32_t result_shm_id, |
| 1164 | uint32_t result_shm_offset) { |
| 1165 | gles2::cmds::IsSampler* c = GetCmdSpace<gles2::cmds::IsSampler>(); |
| 1166 | if (c) { |
| 1167 | c->Init(sampler, result_shm_id, result_shm_offset); |
| 1168 | } |
| 1169 | } |
| 1170 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1171 | void IsShader(GLuint shader, |
| 1172 | uint32_t result_shm_id, |
| 1173 | uint32_t result_shm_offset) { |
| 1174 | gles2::cmds::IsShader* c = GetCmdSpace<gles2::cmds::IsShader>(); |
| 1175 | if (c) { |
| 1176 | c->Init(shader, result_shm_id, result_shm_offset); |
| 1177 | } |
| 1178 | } |
| 1179 | |
Benjamin Lerman | df06e5f | 2015-01-22 13:22:57 +0100 | [diff] [blame] | 1180 | void IsSync(GLuint sync, uint32_t result_shm_id, uint32_t result_shm_offset) { |
| 1181 | gles2::cmds::IsSync* c = GetCmdSpace<gles2::cmds::IsSync>(); |
| 1182 | if (c) { |
| 1183 | c->Init(sync, result_shm_id, result_shm_offset); |
| 1184 | } |
| 1185 | } |
| 1186 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1187 | void IsTexture(GLuint texture, |
| 1188 | uint32_t result_shm_id, |
| 1189 | uint32_t result_shm_offset) { |
| 1190 | gles2::cmds::IsTexture* c = GetCmdSpace<gles2::cmds::IsTexture>(); |
| 1191 | if (c) { |
| 1192 | c->Init(texture, result_shm_id, result_shm_offset); |
| 1193 | } |
| 1194 | } |
| 1195 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 1196 | void IsTransformFeedback(GLuint transformfeedback, |
| 1197 | uint32_t result_shm_id, |
| 1198 | uint32_t result_shm_offset) { |
| 1199 | gles2::cmds::IsTransformFeedback* c = |
| 1200 | GetCmdSpace<gles2::cmds::IsTransformFeedback>(); |
| 1201 | if (c) { |
| 1202 | c->Init(transformfeedback, result_shm_id, result_shm_offset); |
| 1203 | } |
| 1204 | } |
| 1205 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1206 | void LineWidth(GLfloat width) { |
| 1207 | gles2::cmds::LineWidth* c = GetCmdSpace<gles2::cmds::LineWidth>(); |
| 1208 | if (c) { |
| 1209 | c->Init(width); |
| 1210 | } |
| 1211 | } |
| 1212 | |
| 1213 | void LinkProgram(GLuint program) { |
| 1214 | gles2::cmds::LinkProgram* c = GetCmdSpace<gles2::cmds::LinkProgram>(); |
| 1215 | if (c) { |
| 1216 | c->Init(program); |
| 1217 | } |
| 1218 | } |
| 1219 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 1220 | void PauseTransformFeedback() { |
| 1221 | gles2::cmds::PauseTransformFeedback* c = |
| 1222 | GetCmdSpace<gles2::cmds::PauseTransformFeedback>(); |
| 1223 | if (c) { |
| 1224 | c->Init(); |
| 1225 | } |
| 1226 | } |
| 1227 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1228 | void PixelStorei(GLenum pname, GLint param) { |
| 1229 | gles2::cmds::PixelStorei* c = GetCmdSpace<gles2::cmds::PixelStorei>(); |
| 1230 | if (c) { |
| 1231 | c->Init(pname, param); |
| 1232 | } |
| 1233 | } |
| 1234 | |
| 1235 | void PolygonOffset(GLfloat factor, GLfloat units) { |
| 1236 | gles2::cmds::PolygonOffset* c = GetCmdSpace<gles2::cmds::PolygonOffset>(); |
| 1237 | if (c) { |
| 1238 | c->Init(factor, units); |
| 1239 | } |
| 1240 | } |
| 1241 | |
James Robinson | d2015d9 | 2014-12-08 13:45:40 -0800 | [diff] [blame] | 1242 | void ReadBuffer(GLenum src) { |
| 1243 | gles2::cmds::ReadBuffer* c = GetCmdSpace<gles2::cmds::ReadBuffer>(); |
| 1244 | if (c) { |
| 1245 | c->Init(src); |
| 1246 | } |
| 1247 | } |
| 1248 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1249 | void ReadPixels(GLint x, |
| 1250 | GLint y, |
| 1251 | GLsizei width, |
| 1252 | GLsizei height, |
| 1253 | GLenum format, |
| 1254 | GLenum type, |
| 1255 | uint32_t pixels_shm_id, |
| 1256 | uint32_t pixels_shm_offset, |
| 1257 | uint32_t result_shm_id, |
| 1258 | uint32_t result_shm_offset, |
| 1259 | GLboolean async) { |
| 1260 | gles2::cmds::ReadPixels* c = GetCmdSpace<gles2::cmds::ReadPixels>(); |
| 1261 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 1262 | c->Init(x, y, width, height, format, type, pixels_shm_id, pixels_shm_offset, |
| 1263 | result_shm_id, result_shm_offset, async); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1264 | } |
| 1265 | } |
| 1266 | |
| 1267 | void ReleaseShaderCompiler() { |
| 1268 | gles2::cmds::ReleaseShaderCompiler* c = |
| 1269 | GetCmdSpace<gles2::cmds::ReleaseShaderCompiler>(); |
| 1270 | if (c) { |
| 1271 | c->Init(); |
| 1272 | } |
| 1273 | } |
| 1274 | |
| 1275 | void RenderbufferStorage(GLenum target, |
| 1276 | GLenum internalformat, |
| 1277 | GLsizei width, |
| 1278 | GLsizei height) { |
| 1279 | gles2::cmds::RenderbufferStorage* c = |
| 1280 | GetCmdSpace<gles2::cmds::RenderbufferStorage>(); |
| 1281 | if (c) { |
| 1282 | c->Init(target, internalformat, width, height); |
| 1283 | } |
| 1284 | } |
| 1285 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 1286 | void ResumeTransformFeedback() { |
| 1287 | gles2::cmds::ResumeTransformFeedback* c = |
| 1288 | GetCmdSpace<gles2::cmds::ResumeTransformFeedback>(); |
| 1289 | if (c) { |
| 1290 | c->Init(); |
| 1291 | } |
| 1292 | } |
| 1293 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1294 | void SampleCoverage(GLclampf value, GLboolean invert) { |
| 1295 | gles2::cmds::SampleCoverage* c = GetCmdSpace<gles2::cmds::SampleCoverage>(); |
| 1296 | if (c) { |
| 1297 | c->Init(value, invert); |
| 1298 | } |
| 1299 | } |
| 1300 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 1301 | void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) { |
| 1302 | gles2::cmds::SamplerParameterf* c = |
| 1303 | GetCmdSpace<gles2::cmds::SamplerParameterf>(); |
| 1304 | if (c) { |
| 1305 | c->Init(sampler, pname, param); |
| 1306 | } |
| 1307 | } |
| 1308 | |
| 1309 | void SamplerParameterfvImmediate(GLuint sampler, |
| 1310 | GLenum pname, |
| 1311 | const GLfloat* params) { |
| 1312 | const uint32_t size = gles2::cmds::SamplerParameterfvImmediate::ComputeSize(); |
| 1313 | gles2::cmds::SamplerParameterfvImmediate* c = |
| 1314 | GetImmediateCmdSpaceTotalSize<gles2::cmds::SamplerParameterfvImmediate>( |
| 1315 | size); |
| 1316 | if (c) { |
| 1317 | c->Init(sampler, pname, params); |
| 1318 | } |
| 1319 | } |
| 1320 | |
| 1321 | void SamplerParameteri(GLuint sampler, GLenum pname, GLint param) { |
| 1322 | gles2::cmds::SamplerParameteri* c = |
| 1323 | GetCmdSpace<gles2::cmds::SamplerParameteri>(); |
| 1324 | if (c) { |
| 1325 | c->Init(sampler, pname, param); |
| 1326 | } |
| 1327 | } |
| 1328 | |
| 1329 | void SamplerParameterivImmediate(GLuint sampler, |
| 1330 | GLenum pname, |
| 1331 | const GLint* params) { |
| 1332 | const uint32_t size = gles2::cmds::SamplerParameterivImmediate::ComputeSize(); |
| 1333 | gles2::cmds::SamplerParameterivImmediate* c = |
| 1334 | GetImmediateCmdSpaceTotalSize<gles2::cmds::SamplerParameterivImmediate>( |
| 1335 | size); |
| 1336 | if (c) { |
| 1337 | c->Init(sampler, pname, params); |
| 1338 | } |
| 1339 | } |
| 1340 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1341 | void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { |
| 1342 | gles2::cmds::Scissor* c = GetCmdSpace<gles2::cmds::Scissor>(); |
| 1343 | if (c) { |
| 1344 | c->Init(x, y, width, height); |
| 1345 | } |
| 1346 | } |
| 1347 | |
| 1348 | void ShaderBinary(GLsizei n, |
| 1349 | uint32_t shaders_shm_id, |
| 1350 | uint32_t shaders_shm_offset, |
| 1351 | GLenum binaryformat, |
| 1352 | uint32_t binary_shm_id, |
| 1353 | uint32_t binary_shm_offset, |
| 1354 | GLsizei length) { |
| 1355 | gles2::cmds::ShaderBinary* c = GetCmdSpace<gles2::cmds::ShaderBinary>(); |
| 1356 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 1357 | c->Init(n, shaders_shm_id, shaders_shm_offset, binaryformat, binary_shm_id, |
| 1358 | binary_shm_offset, length); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1359 | } |
| 1360 | } |
| 1361 | |
Benjamin Lerman | df06e5f | 2015-01-22 13:22:57 +0100 | [diff] [blame] | 1362 | void ShaderSourceBucket(GLuint shader, uint32_t str_bucket_id) { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1363 | gles2::cmds::ShaderSourceBucket* c = |
| 1364 | GetCmdSpace<gles2::cmds::ShaderSourceBucket>(); |
| 1365 | if (c) { |
Benjamin Lerman | df06e5f | 2015-01-22 13:22:57 +0100 | [diff] [blame] | 1366 | c->Init(shader, str_bucket_id); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1367 | } |
| 1368 | } |
| 1369 | |
| 1370 | void StencilFunc(GLenum func, GLint ref, GLuint mask) { |
| 1371 | gles2::cmds::StencilFunc* c = GetCmdSpace<gles2::cmds::StencilFunc>(); |
| 1372 | if (c) { |
| 1373 | c->Init(func, ref, mask); |
| 1374 | } |
| 1375 | } |
| 1376 | |
| 1377 | void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { |
| 1378 | gles2::cmds::StencilFuncSeparate* c = |
| 1379 | GetCmdSpace<gles2::cmds::StencilFuncSeparate>(); |
| 1380 | if (c) { |
| 1381 | c->Init(face, func, ref, mask); |
| 1382 | } |
| 1383 | } |
| 1384 | |
| 1385 | void StencilMask(GLuint mask) { |
| 1386 | gles2::cmds::StencilMask* c = GetCmdSpace<gles2::cmds::StencilMask>(); |
| 1387 | if (c) { |
| 1388 | c->Init(mask); |
| 1389 | } |
| 1390 | } |
| 1391 | |
| 1392 | void StencilMaskSeparate(GLenum face, GLuint mask) { |
| 1393 | gles2::cmds::StencilMaskSeparate* c = |
| 1394 | GetCmdSpace<gles2::cmds::StencilMaskSeparate>(); |
| 1395 | if (c) { |
| 1396 | c->Init(face, mask); |
| 1397 | } |
| 1398 | } |
| 1399 | |
| 1400 | void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) { |
| 1401 | gles2::cmds::StencilOp* c = GetCmdSpace<gles2::cmds::StencilOp>(); |
| 1402 | if (c) { |
| 1403 | c->Init(fail, zfail, zpass); |
| 1404 | } |
| 1405 | } |
| 1406 | |
| 1407 | void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { |
| 1408 | gles2::cmds::StencilOpSeparate* c = |
| 1409 | GetCmdSpace<gles2::cmds::StencilOpSeparate>(); |
| 1410 | if (c) { |
| 1411 | c->Init(face, fail, zfail, zpass); |
| 1412 | } |
| 1413 | } |
| 1414 | |
| 1415 | void TexImage2D(GLenum target, |
| 1416 | GLint level, |
| 1417 | GLint internalformat, |
| 1418 | GLsizei width, |
| 1419 | GLsizei height, |
| 1420 | GLenum format, |
| 1421 | GLenum type, |
| 1422 | uint32_t pixels_shm_id, |
| 1423 | uint32_t pixels_shm_offset) { |
| 1424 | gles2::cmds::TexImage2D* c = GetCmdSpace<gles2::cmds::TexImage2D>(); |
| 1425 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 1426 | c->Init(target, level, internalformat, width, height, format, type, |
| 1427 | pixels_shm_id, pixels_shm_offset); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1428 | } |
| 1429 | } |
| 1430 | |
James Robinson | d753aca | 2015-01-12 13:07:20 -0800 | [diff] [blame] | 1431 | void TexImage3D(GLenum target, |
| 1432 | GLint level, |
| 1433 | GLint internalformat, |
| 1434 | GLsizei width, |
| 1435 | GLsizei height, |
| 1436 | GLsizei depth, |
| 1437 | GLenum format, |
| 1438 | GLenum type, |
| 1439 | uint32_t pixels_shm_id, |
| 1440 | uint32_t pixels_shm_offset) { |
| 1441 | gles2::cmds::TexImage3D* c = GetCmdSpace<gles2::cmds::TexImage3D>(); |
| 1442 | if (c) { |
| 1443 | c->Init(target, level, internalformat, width, height, depth, format, type, |
| 1444 | pixels_shm_id, pixels_shm_offset); |
| 1445 | } |
| 1446 | } |
| 1447 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1448 | void TexParameterf(GLenum target, GLenum pname, GLfloat param) { |
| 1449 | gles2::cmds::TexParameterf* c = GetCmdSpace<gles2::cmds::TexParameterf>(); |
| 1450 | if (c) { |
| 1451 | c->Init(target, pname, param); |
| 1452 | } |
| 1453 | } |
| 1454 | |
| 1455 | void TexParameterfvImmediate(GLenum target, |
| 1456 | GLenum pname, |
| 1457 | const GLfloat* params) { |
| 1458 | const uint32_t size = gles2::cmds::TexParameterfvImmediate::ComputeSize(); |
| 1459 | gles2::cmds::TexParameterfvImmediate* c = |
| 1460 | GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterfvImmediate>(size); |
| 1461 | if (c) { |
| 1462 | c->Init(target, pname, params); |
| 1463 | } |
| 1464 | } |
| 1465 | |
| 1466 | void TexParameteri(GLenum target, GLenum pname, GLint param) { |
| 1467 | gles2::cmds::TexParameteri* c = GetCmdSpace<gles2::cmds::TexParameteri>(); |
| 1468 | if (c) { |
| 1469 | c->Init(target, pname, param); |
| 1470 | } |
| 1471 | } |
| 1472 | |
| 1473 | void TexParameterivImmediate(GLenum target, GLenum pname, const GLint* params) { |
| 1474 | const uint32_t size = gles2::cmds::TexParameterivImmediate::ComputeSize(); |
| 1475 | gles2::cmds::TexParameterivImmediate* c = |
| 1476 | GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterivImmediate>(size); |
| 1477 | if (c) { |
| 1478 | c->Init(target, pname, params); |
| 1479 | } |
| 1480 | } |
| 1481 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1482 | void TexStorage3D(GLenum target, |
| 1483 | GLsizei levels, |
| 1484 | GLenum internalFormat, |
| 1485 | GLsizei width, |
| 1486 | GLsizei height, |
| 1487 | GLsizei depth) { |
| 1488 | gles2::cmds::TexStorage3D* c = GetCmdSpace<gles2::cmds::TexStorage3D>(); |
| 1489 | if (c) { |
| 1490 | c->Init(target, levels, internalFormat, width, height, depth); |
| 1491 | } |
| 1492 | } |
| 1493 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1494 | void TexSubImage2D(GLenum target, |
| 1495 | GLint level, |
| 1496 | GLint xoffset, |
| 1497 | GLint yoffset, |
| 1498 | GLsizei width, |
| 1499 | GLsizei height, |
| 1500 | GLenum format, |
| 1501 | GLenum type, |
| 1502 | uint32_t pixels_shm_id, |
| 1503 | uint32_t pixels_shm_offset, |
| 1504 | GLboolean internal) { |
| 1505 | gles2::cmds::TexSubImage2D* c = GetCmdSpace<gles2::cmds::TexSubImage2D>(); |
| 1506 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 1507 | c->Init(target, level, xoffset, yoffset, width, height, format, type, |
| 1508 | pixels_shm_id, pixels_shm_offset, internal); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1509 | } |
| 1510 | } |
| 1511 | |
James Robinson | d753aca | 2015-01-12 13:07:20 -0800 | [diff] [blame] | 1512 | void TexSubImage3D(GLenum target, |
| 1513 | GLint level, |
| 1514 | GLint xoffset, |
| 1515 | GLint yoffset, |
| 1516 | GLint zoffset, |
| 1517 | GLsizei width, |
| 1518 | GLsizei height, |
| 1519 | GLsizei depth, |
| 1520 | GLenum format, |
| 1521 | GLenum type, |
| 1522 | uint32_t pixels_shm_id, |
| 1523 | uint32_t pixels_shm_offset, |
| 1524 | GLboolean internal) { |
| 1525 | gles2::cmds::TexSubImage3D* c = GetCmdSpace<gles2::cmds::TexSubImage3D>(); |
| 1526 | if (c) { |
| 1527 | c->Init(target, level, xoffset, yoffset, zoffset, width, height, depth, |
| 1528 | format, type, pixels_shm_id, pixels_shm_offset, internal); |
| 1529 | } |
| 1530 | } |
| 1531 | |
Benjamin Lerman | cdfc88d | 2015-02-03 14:35:12 +0100 | [diff] [blame] | 1532 | void TransformFeedbackVaryingsBucket(GLuint program, |
| 1533 | uint32_t varyings_bucket_id, |
| 1534 | GLenum buffermode) { |
| 1535 | gles2::cmds::TransformFeedbackVaryingsBucket* c = |
| 1536 | GetCmdSpace<gles2::cmds::TransformFeedbackVaryingsBucket>(); |
| 1537 | if (c) { |
| 1538 | c->Init(program, varyings_bucket_id, buffermode); |
| 1539 | } |
| 1540 | } |
| 1541 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1542 | void Uniform1f(GLint location, GLfloat x) { |
| 1543 | gles2::cmds::Uniform1f* c = GetCmdSpace<gles2::cmds::Uniform1f>(); |
| 1544 | if (c) { |
| 1545 | c->Init(location, x); |
| 1546 | } |
| 1547 | } |
| 1548 | |
| 1549 | void Uniform1fvImmediate(GLint location, GLsizei count, const GLfloat* v) { |
| 1550 | const uint32_t size = gles2::cmds::Uniform1fvImmediate::ComputeSize(count); |
| 1551 | gles2::cmds::Uniform1fvImmediate* c = |
| 1552 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1fvImmediate>(size); |
| 1553 | if (c) { |
| 1554 | c->Init(location, count, v); |
| 1555 | } |
| 1556 | } |
| 1557 | |
| 1558 | void Uniform1i(GLint location, GLint x) { |
| 1559 | gles2::cmds::Uniform1i* c = GetCmdSpace<gles2::cmds::Uniform1i>(); |
| 1560 | if (c) { |
| 1561 | c->Init(location, x); |
| 1562 | } |
| 1563 | } |
| 1564 | |
| 1565 | void Uniform1ivImmediate(GLint location, GLsizei count, const GLint* v) { |
| 1566 | const uint32_t size = gles2::cmds::Uniform1ivImmediate::ComputeSize(count); |
| 1567 | gles2::cmds::Uniform1ivImmediate* c = |
| 1568 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1ivImmediate>(size); |
| 1569 | if (c) { |
| 1570 | c->Init(location, count, v); |
| 1571 | } |
| 1572 | } |
| 1573 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1574 | void Uniform1ui(GLint location, GLuint x) { |
| 1575 | gles2::cmds::Uniform1ui* c = GetCmdSpace<gles2::cmds::Uniform1ui>(); |
| 1576 | if (c) { |
| 1577 | c->Init(location, x); |
| 1578 | } |
| 1579 | } |
| 1580 | |
| 1581 | void Uniform1uivImmediate(GLint location, GLsizei count, const GLuint* v) { |
| 1582 | const uint32_t size = gles2::cmds::Uniform1uivImmediate::ComputeSize(count); |
| 1583 | gles2::cmds::Uniform1uivImmediate* c = |
| 1584 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1uivImmediate>(size); |
| 1585 | if (c) { |
| 1586 | c->Init(location, count, v); |
| 1587 | } |
| 1588 | } |
| 1589 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1590 | void Uniform2f(GLint location, GLfloat x, GLfloat y) { |
| 1591 | gles2::cmds::Uniform2f* c = GetCmdSpace<gles2::cmds::Uniform2f>(); |
| 1592 | if (c) { |
| 1593 | c->Init(location, x, y); |
| 1594 | } |
| 1595 | } |
| 1596 | |
| 1597 | void Uniform2fvImmediate(GLint location, GLsizei count, const GLfloat* v) { |
| 1598 | const uint32_t size = gles2::cmds::Uniform2fvImmediate::ComputeSize(count); |
| 1599 | gles2::cmds::Uniform2fvImmediate* c = |
| 1600 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2fvImmediate>(size); |
| 1601 | if (c) { |
| 1602 | c->Init(location, count, v); |
| 1603 | } |
| 1604 | } |
| 1605 | |
| 1606 | void Uniform2i(GLint location, GLint x, GLint y) { |
| 1607 | gles2::cmds::Uniform2i* c = GetCmdSpace<gles2::cmds::Uniform2i>(); |
| 1608 | if (c) { |
| 1609 | c->Init(location, x, y); |
| 1610 | } |
| 1611 | } |
| 1612 | |
| 1613 | void Uniform2ivImmediate(GLint location, GLsizei count, const GLint* v) { |
| 1614 | const uint32_t size = gles2::cmds::Uniform2ivImmediate::ComputeSize(count); |
| 1615 | gles2::cmds::Uniform2ivImmediate* c = |
| 1616 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2ivImmediate>(size); |
| 1617 | if (c) { |
| 1618 | c->Init(location, count, v); |
| 1619 | } |
| 1620 | } |
| 1621 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1622 | void Uniform2ui(GLint location, GLuint x, GLuint y) { |
| 1623 | gles2::cmds::Uniform2ui* c = GetCmdSpace<gles2::cmds::Uniform2ui>(); |
| 1624 | if (c) { |
| 1625 | c->Init(location, x, y); |
| 1626 | } |
| 1627 | } |
| 1628 | |
| 1629 | void Uniform2uivImmediate(GLint location, GLsizei count, const GLuint* v) { |
| 1630 | const uint32_t size = gles2::cmds::Uniform2uivImmediate::ComputeSize(count); |
| 1631 | gles2::cmds::Uniform2uivImmediate* c = |
| 1632 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2uivImmediate>(size); |
| 1633 | if (c) { |
| 1634 | c->Init(location, count, v); |
| 1635 | } |
| 1636 | } |
| 1637 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1638 | void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) { |
| 1639 | gles2::cmds::Uniform3f* c = GetCmdSpace<gles2::cmds::Uniform3f>(); |
| 1640 | if (c) { |
| 1641 | c->Init(location, x, y, z); |
| 1642 | } |
| 1643 | } |
| 1644 | |
| 1645 | void Uniform3fvImmediate(GLint location, GLsizei count, const GLfloat* v) { |
| 1646 | const uint32_t size = gles2::cmds::Uniform3fvImmediate::ComputeSize(count); |
| 1647 | gles2::cmds::Uniform3fvImmediate* c = |
| 1648 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3fvImmediate>(size); |
| 1649 | if (c) { |
| 1650 | c->Init(location, count, v); |
| 1651 | } |
| 1652 | } |
| 1653 | |
| 1654 | void Uniform3i(GLint location, GLint x, GLint y, GLint z) { |
| 1655 | gles2::cmds::Uniform3i* c = GetCmdSpace<gles2::cmds::Uniform3i>(); |
| 1656 | if (c) { |
| 1657 | c->Init(location, x, y, z); |
| 1658 | } |
| 1659 | } |
| 1660 | |
| 1661 | void Uniform3ivImmediate(GLint location, GLsizei count, const GLint* v) { |
| 1662 | const uint32_t size = gles2::cmds::Uniform3ivImmediate::ComputeSize(count); |
| 1663 | gles2::cmds::Uniform3ivImmediate* c = |
| 1664 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3ivImmediate>(size); |
| 1665 | if (c) { |
| 1666 | c->Init(location, count, v); |
| 1667 | } |
| 1668 | } |
| 1669 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1670 | void Uniform3ui(GLint location, GLuint x, GLuint y, GLuint z) { |
| 1671 | gles2::cmds::Uniform3ui* c = GetCmdSpace<gles2::cmds::Uniform3ui>(); |
| 1672 | if (c) { |
| 1673 | c->Init(location, x, y, z); |
| 1674 | } |
| 1675 | } |
| 1676 | |
| 1677 | void Uniform3uivImmediate(GLint location, GLsizei count, const GLuint* v) { |
| 1678 | const uint32_t size = gles2::cmds::Uniform3uivImmediate::ComputeSize(count); |
| 1679 | gles2::cmds::Uniform3uivImmediate* c = |
| 1680 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3uivImmediate>(size); |
| 1681 | if (c) { |
| 1682 | c->Init(location, count, v); |
| 1683 | } |
| 1684 | } |
| 1685 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1686 | void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { |
| 1687 | gles2::cmds::Uniform4f* c = GetCmdSpace<gles2::cmds::Uniform4f>(); |
| 1688 | if (c) { |
| 1689 | c->Init(location, x, y, z, w); |
| 1690 | } |
| 1691 | } |
| 1692 | |
| 1693 | void Uniform4fvImmediate(GLint location, GLsizei count, const GLfloat* v) { |
| 1694 | const uint32_t size = gles2::cmds::Uniform4fvImmediate::ComputeSize(count); |
| 1695 | gles2::cmds::Uniform4fvImmediate* c = |
| 1696 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4fvImmediate>(size); |
| 1697 | if (c) { |
| 1698 | c->Init(location, count, v); |
| 1699 | } |
| 1700 | } |
| 1701 | |
| 1702 | void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { |
| 1703 | gles2::cmds::Uniform4i* c = GetCmdSpace<gles2::cmds::Uniform4i>(); |
| 1704 | if (c) { |
| 1705 | c->Init(location, x, y, z, w); |
| 1706 | } |
| 1707 | } |
| 1708 | |
| 1709 | void Uniform4ivImmediate(GLint location, GLsizei count, const GLint* v) { |
| 1710 | const uint32_t size = gles2::cmds::Uniform4ivImmediate::ComputeSize(count); |
| 1711 | gles2::cmds::Uniform4ivImmediate* c = |
| 1712 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4ivImmediate>(size); |
| 1713 | if (c) { |
| 1714 | c->Init(location, count, v); |
| 1715 | } |
| 1716 | } |
| 1717 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1718 | void Uniform4ui(GLint location, GLuint x, GLuint y, GLuint z, GLuint w) { |
| 1719 | gles2::cmds::Uniform4ui* c = GetCmdSpace<gles2::cmds::Uniform4ui>(); |
| 1720 | if (c) { |
| 1721 | c->Init(location, x, y, z, w); |
| 1722 | } |
| 1723 | } |
| 1724 | |
| 1725 | void Uniform4uivImmediate(GLint location, GLsizei count, const GLuint* v) { |
| 1726 | const uint32_t size = gles2::cmds::Uniform4uivImmediate::ComputeSize(count); |
| 1727 | gles2::cmds::Uniform4uivImmediate* c = |
| 1728 | GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4uivImmediate>(size); |
| 1729 | if (c) { |
| 1730 | c->Init(location, count, v); |
| 1731 | } |
| 1732 | } |
| 1733 | |
Etienne Membrives | 386015a | 2015-02-19 17:27:12 +0100 | [diff] [blame] | 1734 | void UniformBlockBinding(GLuint program, GLuint index, GLuint binding) { |
| 1735 | gles2::cmds::UniformBlockBinding* c = |
| 1736 | GetCmdSpace<gles2::cmds::UniformBlockBinding>(); |
| 1737 | if (c) { |
| 1738 | c->Init(program, index, binding); |
| 1739 | } |
| 1740 | } |
| 1741 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1742 | void UniformMatrix2fvImmediate(GLint location, |
| 1743 | GLsizei count, |
| 1744 | const GLfloat* value) { |
| 1745 | const uint32_t size = |
| 1746 | gles2::cmds::UniformMatrix2fvImmediate::ComputeSize(count); |
| 1747 | gles2::cmds::UniformMatrix2fvImmediate* c = |
| 1748 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix2fvImmediate>( |
| 1749 | size); |
| 1750 | if (c) { |
| 1751 | c->Init(location, count, value); |
| 1752 | } |
| 1753 | } |
| 1754 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1755 | void UniformMatrix2x3fvImmediate(GLint location, |
| 1756 | GLsizei count, |
| 1757 | const GLfloat* value) { |
| 1758 | const uint32_t size = |
| 1759 | gles2::cmds::UniformMatrix2x3fvImmediate::ComputeSize(count); |
| 1760 | gles2::cmds::UniformMatrix2x3fvImmediate* c = |
| 1761 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix2x3fvImmediate>( |
| 1762 | size); |
| 1763 | if (c) { |
| 1764 | c->Init(location, count, value); |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | void UniformMatrix2x4fvImmediate(GLint location, |
| 1769 | GLsizei count, |
| 1770 | const GLfloat* value) { |
| 1771 | const uint32_t size = |
| 1772 | gles2::cmds::UniformMatrix2x4fvImmediate::ComputeSize(count); |
| 1773 | gles2::cmds::UniformMatrix2x4fvImmediate* c = |
| 1774 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix2x4fvImmediate>( |
| 1775 | size); |
| 1776 | if (c) { |
| 1777 | c->Init(location, count, value); |
| 1778 | } |
| 1779 | } |
| 1780 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1781 | void UniformMatrix3fvImmediate(GLint location, |
| 1782 | GLsizei count, |
| 1783 | const GLfloat* value) { |
| 1784 | const uint32_t size = |
| 1785 | gles2::cmds::UniformMatrix3fvImmediate::ComputeSize(count); |
| 1786 | gles2::cmds::UniformMatrix3fvImmediate* c = |
| 1787 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix3fvImmediate>( |
| 1788 | size); |
| 1789 | if (c) { |
| 1790 | c->Init(location, count, value); |
| 1791 | } |
| 1792 | } |
| 1793 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1794 | void UniformMatrix3x2fvImmediate(GLint location, |
| 1795 | GLsizei count, |
| 1796 | const GLfloat* value) { |
| 1797 | const uint32_t size = |
| 1798 | gles2::cmds::UniformMatrix3x2fvImmediate::ComputeSize(count); |
| 1799 | gles2::cmds::UniformMatrix3x2fvImmediate* c = |
| 1800 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix3x2fvImmediate>( |
| 1801 | size); |
| 1802 | if (c) { |
| 1803 | c->Init(location, count, value); |
| 1804 | } |
| 1805 | } |
| 1806 | |
| 1807 | void UniformMatrix3x4fvImmediate(GLint location, |
| 1808 | GLsizei count, |
| 1809 | const GLfloat* value) { |
| 1810 | const uint32_t size = |
| 1811 | gles2::cmds::UniformMatrix3x4fvImmediate::ComputeSize(count); |
| 1812 | gles2::cmds::UniformMatrix3x4fvImmediate* c = |
| 1813 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix3x4fvImmediate>( |
| 1814 | size); |
| 1815 | if (c) { |
| 1816 | c->Init(location, count, value); |
| 1817 | } |
| 1818 | } |
| 1819 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1820 | void UniformMatrix4fvImmediate(GLint location, |
| 1821 | GLsizei count, |
| 1822 | const GLfloat* value) { |
| 1823 | const uint32_t size = |
| 1824 | gles2::cmds::UniformMatrix4fvImmediate::ComputeSize(count); |
| 1825 | gles2::cmds::UniformMatrix4fvImmediate* c = |
| 1826 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix4fvImmediate>( |
| 1827 | size); |
| 1828 | if (c) { |
| 1829 | c->Init(location, count, value); |
| 1830 | } |
| 1831 | } |
| 1832 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1833 | void UniformMatrix4x2fvImmediate(GLint location, |
| 1834 | GLsizei count, |
| 1835 | const GLfloat* value) { |
| 1836 | const uint32_t size = |
| 1837 | gles2::cmds::UniformMatrix4x2fvImmediate::ComputeSize(count); |
| 1838 | gles2::cmds::UniformMatrix4x2fvImmediate* c = |
| 1839 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix4x2fvImmediate>( |
| 1840 | size); |
| 1841 | if (c) { |
| 1842 | c->Init(location, count, value); |
| 1843 | } |
| 1844 | } |
| 1845 | |
| 1846 | void UniformMatrix4x3fvImmediate(GLint location, |
| 1847 | GLsizei count, |
| 1848 | const GLfloat* value) { |
| 1849 | const uint32_t size = |
| 1850 | gles2::cmds::UniformMatrix4x3fvImmediate::ComputeSize(count); |
| 1851 | gles2::cmds::UniformMatrix4x3fvImmediate* c = |
| 1852 | GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix4x3fvImmediate>( |
| 1853 | size); |
| 1854 | if (c) { |
| 1855 | c->Init(location, count, value); |
| 1856 | } |
| 1857 | } |
| 1858 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1859 | void UseProgram(GLuint program) { |
| 1860 | gles2::cmds::UseProgram* c = GetCmdSpace<gles2::cmds::UseProgram>(); |
| 1861 | if (c) { |
| 1862 | c->Init(program); |
| 1863 | } |
| 1864 | } |
| 1865 | |
| 1866 | void ValidateProgram(GLuint program) { |
| 1867 | gles2::cmds::ValidateProgram* c = GetCmdSpace<gles2::cmds::ValidateProgram>(); |
| 1868 | if (c) { |
| 1869 | c->Init(program); |
| 1870 | } |
| 1871 | } |
| 1872 | |
| 1873 | void VertexAttrib1f(GLuint indx, GLfloat x) { |
| 1874 | gles2::cmds::VertexAttrib1f* c = GetCmdSpace<gles2::cmds::VertexAttrib1f>(); |
| 1875 | if (c) { |
| 1876 | c->Init(indx, x); |
| 1877 | } |
| 1878 | } |
| 1879 | |
| 1880 | void VertexAttrib1fvImmediate(GLuint indx, const GLfloat* values) { |
| 1881 | const uint32_t size = gles2::cmds::VertexAttrib1fvImmediate::ComputeSize(); |
| 1882 | gles2::cmds::VertexAttrib1fvImmediate* c = |
| 1883 | GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib1fvImmediate>( |
| 1884 | size); |
| 1885 | if (c) { |
| 1886 | c->Init(indx, values); |
| 1887 | } |
| 1888 | } |
| 1889 | |
| 1890 | void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { |
| 1891 | gles2::cmds::VertexAttrib2f* c = GetCmdSpace<gles2::cmds::VertexAttrib2f>(); |
| 1892 | if (c) { |
| 1893 | c->Init(indx, x, y); |
| 1894 | } |
| 1895 | } |
| 1896 | |
| 1897 | void VertexAttrib2fvImmediate(GLuint indx, const GLfloat* values) { |
| 1898 | const uint32_t size = gles2::cmds::VertexAttrib2fvImmediate::ComputeSize(); |
| 1899 | gles2::cmds::VertexAttrib2fvImmediate* c = |
| 1900 | GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib2fvImmediate>( |
| 1901 | size); |
| 1902 | if (c) { |
| 1903 | c->Init(indx, values); |
| 1904 | } |
| 1905 | } |
| 1906 | |
| 1907 | void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { |
| 1908 | gles2::cmds::VertexAttrib3f* c = GetCmdSpace<gles2::cmds::VertexAttrib3f>(); |
| 1909 | if (c) { |
| 1910 | c->Init(indx, x, y, z); |
| 1911 | } |
| 1912 | } |
| 1913 | |
| 1914 | void VertexAttrib3fvImmediate(GLuint indx, const GLfloat* values) { |
| 1915 | const uint32_t size = gles2::cmds::VertexAttrib3fvImmediate::ComputeSize(); |
| 1916 | gles2::cmds::VertexAttrib3fvImmediate* c = |
| 1917 | GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib3fvImmediate>( |
| 1918 | size); |
| 1919 | if (c) { |
| 1920 | c->Init(indx, values); |
| 1921 | } |
| 1922 | } |
| 1923 | |
| 1924 | void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { |
| 1925 | gles2::cmds::VertexAttrib4f* c = GetCmdSpace<gles2::cmds::VertexAttrib4f>(); |
| 1926 | if (c) { |
| 1927 | c->Init(indx, x, y, z, w); |
| 1928 | } |
| 1929 | } |
| 1930 | |
| 1931 | void VertexAttrib4fvImmediate(GLuint indx, const GLfloat* values) { |
| 1932 | const uint32_t size = gles2::cmds::VertexAttrib4fvImmediate::ComputeSize(); |
| 1933 | gles2::cmds::VertexAttrib4fvImmediate* c = |
| 1934 | GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib4fvImmediate>( |
| 1935 | size); |
| 1936 | if (c) { |
| 1937 | c->Init(indx, values); |
| 1938 | } |
| 1939 | } |
| 1940 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 1941 | void VertexAttribI4i(GLuint indx, GLint x, GLint y, GLint z, GLint w) { |
| 1942 | gles2::cmds::VertexAttribI4i* c = GetCmdSpace<gles2::cmds::VertexAttribI4i>(); |
| 1943 | if (c) { |
| 1944 | c->Init(indx, x, y, z, w); |
| 1945 | } |
| 1946 | } |
| 1947 | |
| 1948 | void VertexAttribI4ivImmediate(GLuint indx, const GLint* values) { |
| 1949 | const uint32_t size = gles2::cmds::VertexAttribI4ivImmediate::ComputeSize(); |
| 1950 | gles2::cmds::VertexAttribI4ivImmediate* c = |
| 1951 | GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttribI4ivImmediate>( |
| 1952 | size); |
| 1953 | if (c) { |
| 1954 | c->Init(indx, values); |
| 1955 | } |
| 1956 | } |
| 1957 | |
| 1958 | void VertexAttribI4ui(GLuint indx, GLuint x, GLuint y, GLuint z, GLuint w) { |
| 1959 | gles2::cmds::VertexAttribI4ui* c = |
| 1960 | GetCmdSpace<gles2::cmds::VertexAttribI4ui>(); |
| 1961 | if (c) { |
| 1962 | c->Init(indx, x, y, z, w); |
| 1963 | } |
| 1964 | } |
| 1965 | |
| 1966 | void VertexAttribI4uivImmediate(GLuint indx, const GLuint* values) { |
| 1967 | const uint32_t size = gles2::cmds::VertexAttribI4uivImmediate::ComputeSize(); |
| 1968 | gles2::cmds::VertexAttribI4uivImmediate* c = |
| 1969 | GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttribI4uivImmediate>( |
| 1970 | size); |
| 1971 | if (c) { |
| 1972 | c->Init(indx, values); |
| 1973 | } |
| 1974 | } |
| 1975 | |
| 1976 | void VertexAttribIPointer(GLuint indx, |
| 1977 | GLint size, |
| 1978 | GLenum type, |
| 1979 | GLsizei stride, |
| 1980 | GLuint offset) { |
| 1981 | gles2::cmds::VertexAttribIPointer* c = |
| 1982 | GetCmdSpace<gles2::cmds::VertexAttribIPointer>(); |
| 1983 | if (c) { |
| 1984 | c->Init(indx, size, type, stride, offset); |
| 1985 | } |
| 1986 | } |
| 1987 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1988 | void VertexAttribPointer(GLuint indx, |
| 1989 | GLint size, |
| 1990 | GLenum type, |
| 1991 | GLboolean normalized, |
| 1992 | GLsizei stride, |
| 1993 | GLuint offset) { |
| 1994 | gles2::cmds::VertexAttribPointer* c = |
| 1995 | GetCmdSpace<gles2::cmds::VertexAttribPointer>(); |
| 1996 | if (c) { |
| 1997 | c->Init(indx, size, type, normalized, stride, offset); |
| 1998 | } |
| 1999 | } |
| 2000 | |
| 2001 | void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { |
| 2002 | gles2::cmds::Viewport* c = GetCmdSpace<gles2::cmds::Viewport>(); |
| 2003 | if (c) { |
| 2004 | c->Init(x, y, width, height); |
| 2005 | } |
| 2006 | } |
| 2007 | |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 2008 | void WaitSync(GLuint sync, |
| 2009 | GLbitfield flags, |
| 2010 | GLuint timeout_0, |
| 2011 | GLuint timeout_1) { |
| 2012 | gles2::cmds::WaitSync* c = GetCmdSpace<gles2::cmds::WaitSync>(); |
| 2013 | if (c) { |
| 2014 | c->Init(sync, flags, timeout_0, timeout_1); |
| 2015 | } |
| 2016 | } |
| 2017 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2018 | void BlitFramebufferCHROMIUM(GLint srcX0, |
| 2019 | GLint srcY0, |
| 2020 | GLint srcX1, |
| 2021 | GLint srcY1, |
| 2022 | GLint dstX0, |
| 2023 | GLint dstY0, |
| 2024 | GLint dstX1, |
| 2025 | GLint dstY1, |
| 2026 | GLbitfield mask, |
| 2027 | GLenum filter) { |
| 2028 | gles2::cmds::BlitFramebufferCHROMIUM* c = |
| 2029 | GetCmdSpace<gles2::cmds::BlitFramebufferCHROMIUM>(); |
| 2030 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 2031 | c->Init(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, |
| 2032 | filter); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2033 | } |
| 2034 | } |
| 2035 | |
| 2036 | void RenderbufferStorageMultisampleCHROMIUM(GLenum target, |
| 2037 | GLsizei samples, |
| 2038 | GLenum internalformat, |
| 2039 | GLsizei width, |
| 2040 | GLsizei height) { |
| 2041 | gles2::cmds::RenderbufferStorageMultisampleCHROMIUM* c = |
| 2042 | GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleCHROMIUM>(); |
| 2043 | if (c) { |
| 2044 | c->Init(target, samples, internalformat, width, height); |
| 2045 | } |
| 2046 | } |
| 2047 | |
| 2048 | void RenderbufferStorageMultisampleEXT(GLenum target, |
| 2049 | GLsizei samples, |
| 2050 | GLenum internalformat, |
| 2051 | GLsizei width, |
| 2052 | GLsizei height) { |
| 2053 | gles2::cmds::RenderbufferStorageMultisampleEXT* c = |
| 2054 | GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleEXT>(); |
| 2055 | if (c) { |
| 2056 | c->Init(target, samples, internalformat, width, height); |
| 2057 | } |
| 2058 | } |
| 2059 | |
| 2060 | void FramebufferTexture2DMultisampleEXT(GLenum target, |
| 2061 | GLenum attachment, |
| 2062 | GLenum textarget, |
| 2063 | GLuint texture, |
| 2064 | GLsizei samples) { |
| 2065 | gles2::cmds::FramebufferTexture2DMultisampleEXT* c = |
| 2066 | GetCmdSpace<gles2::cmds::FramebufferTexture2DMultisampleEXT>(); |
| 2067 | if (c) { |
| 2068 | c->Init(target, attachment, textarget, texture, samples); |
| 2069 | } |
| 2070 | } |
| 2071 | |
| 2072 | void TexStorage2DEXT(GLenum target, |
| 2073 | GLsizei levels, |
| 2074 | GLenum internalFormat, |
| 2075 | GLsizei width, |
| 2076 | GLsizei height) { |
| 2077 | gles2::cmds::TexStorage2DEXT* c = GetCmdSpace<gles2::cmds::TexStorage2DEXT>(); |
| 2078 | if (c) { |
| 2079 | c->Init(target, levels, internalFormat, width, height); |
| 2080 | } |
| 2081 | } |
| 2082 | |
| 2083 | void GenQueriesEXTImmediate(GLsizei n, GLuint* queries) { |
| 2084 | const uint32_t size = gles2::cmds::GenQueriesEXTImmediate::ComputeSize(n); |
| 2085 | gles2::cmds::GenQueriesEXTImmediate* c = |
| 2086 | GetImmediateCmdSpaceTotalSize<gles2::cmds::GenQueriesEXTImmediate>(size); |
| 2087 | if (c) { |
| 2088 | c->Init(n, queries); |
| 2089 | } |
| 2090 | } |
| 2091 | |
| 2092 | void DeleteQueriesEXTImmediate(GLsizei n, const GLuint* queries) { |
| 2093 | const uint32_t size = gles2::cmds::DeleteQueriesEXTImmediate::ComputeSize(n); |
| 2094 | gles2::cmds::DeleteQueriesEXTImmediate* c = |
| 2095 | GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteQueriesEXTImmediate>( |
| 2096 | size); |
| 2097 | if (c) { |
| 2098 | c->Init(n, queries); |
| 2099 | } |
| 2100 | } |
| 2101 | |
| 2102 | void BeginQueryEXT(GLenum target, |
| 2103 | GLuint id, |
| 2104 | uint32_t sync_data_shm_id, |
| 2105 | uint32_t sync_data_shm_offset) { |
| 2106 | gles2::cmds::BeginQueryEXT* c = GetCmdSpace<gles2::cmds::BeginQueryEXT>(); |
| 2107 | if (c) { |
| 2108 | c->Init(target, id, sync_data_shm_id, sync_data_shm_offset); |
| 2109 | } |
| 2110 | } |
| 2111 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 2112 | void BeginTransformFeedback(GLenum primitivemode) { |
| 2113 | gles2::cmds::BeginTransformFeedback* c = |
| 2114 | GetCmdSpace<gles2::cmds::BeginTransformFeedback>(); |
| 2115 | if (c) { |
| 2116 | c->Init(primitivemode); |
| 2117 | } |
| 2118 | } |
| 2119 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2120 | void EndQueryEXT(GLenum target, GLuint submit_count) { |
| 2121 | gles2::cmds::EndQueryEXT* c = GetCmdSpace<gles2::cmds::EndQueryEXT>(); |
| 2122 | if (c) { |
| 2123 | c->Init(target, submit_count); |
| 2124 | } |
| 2125 | } |
| 2126 | |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 2127 | void EndTransformFeedback() { |
| 2128 | gles2::cmds::EndTransformFeedback* c = |
| 2129 | GetCmdSpace<gles2::cmds::EndTransformFeedback>(); |
| 2130 | if (c) { |
| 2131 | c->Init(); |
| 2132 | } |
| 2133 | } |
| 2134 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2135 | void InsertEventMarkerEXT(GLuint bucket_id) { |
| 2136 | gles2::cmds::InsertEventMarkerEXT* c = |
| 2137 | GetCmdSpace<gles2::cmds::InsertEventMarkerEXT>(); |
| 2138 | if (c) { |
| 2139 | c->Init(bucket_id); |
| 2140 | } |
| 2141 | } |
| 2142 | |
| 2143 | void PushGroupMarkerEXT(GLuint bucket_id) { |
| 2144 | gles2::cmds::PushGroupMarkerEXT* c = |
| 2145 | GetCmdSpace<gles2::cmds::PushGroupMarkerEXT>(); |
| 2146 | if (c) { |
| 2147 | c->Init(bucket_id); |
| 2148 | } |
| 2149 | } |
| 2150 | |
| 2151 | void PopGroupMarkerEXT() { |
| 2152 | gles2::cmds::PopGroupMarkerEXT* c = |
| 2153 | GetCmdSpace<gles2::cmds::PopGroupMarkerEXT>(); |
| 2154 | if (c) { |
| 2155 | c->Init(); |
| 2156 | } |
| 2157 | } |
| 2158 | |
| 2159 | void GenVertexArraysOESImmediate(GLsizei n, GLuint* arrays) { |
| 2160 | const uint32_t size = |
| 2161 | gles2::cmds::GenVertexArraysOESImmediate::ComputeSize(n); |
| 2162 | gles2::cmds::GenVertexArraysOESImmediate* c = |
| 2163 | GetImmediateCmdSpaceTotalSize<gles2::cmds::GenVertexArraysOESImmediate>( |
| 2164 | size); |
| 2165 | if (c) { |
| 2166 | c->Init(n, arrays); |
| 2167 | } |
| 2168 | } |
| 2169 | |
| 2170 | void DeleteVertexArraysOESImmediate(GLsizei n, const GLuint* arrays) { |
| 2171 | const uint32_t size = |
| 2172 | gles2::cmds::DeleteVertexArraysOESImmediate::ComputeSize(n); |
| 2173 | gles2::cmds::DeleteVertexArraysOESImmediate* c = |
| 2174 | GetImmediateCmdSpaceTotalSize< |
| 2175 | gles2::cmds::DeleteVertexArraysOESImmediate>(size); |
| 2176 | if (c) { |
| 2177 | c->Init(n, arrays); |
| 2178 | } |
| 2179 | } |
| 2180 | |
| 2181 | void IsVertexArrayOES(GLuint array, |
| 2182 | uint32_t result_shm_id, |
| 2183 | uint32_t result_shm_offset) { |
| 2184 | gles2::cmds::IsVertexArrayOES* c = |
| 2185 | GetCmdSpace<gles2::cmds::IsVertexArrayOES>(); |
| 2186 | if (c) { |
| 2187 | c->Init(array, result_shm_id, result_shm_offset); |
| 2188 | } |
| 2189 | } |
| 2190 | |
| 2191 | void BindVertexArrayOES(GLuint array) { |
| 2192 | gles2::cmds::BindVertexArrayOES* c = |
| 2193 | GetCmdSpace<gles2::cmds::BindVertexArrayOES>(); |
| 2194 | if (c) { |
| 2195 | c->Init(array); |
| 2196 | } |
| 2197 | } |
| 2198 | |
| 2199 | void SwapBuffers() { |
| 2200 | gles2::cmds::SwapBuffers* c = GetCmdSpace<gles2::cmds::SwapBuffers>(); |
| 2201 | if (c) { |
| 2202 | c->Init(); |
| 2203 | } |
| 2204 | } |
| 2205 | |
| 2206 | void GetMaxValueInBufferCHROMIUM(GLuint buffer_id, |
| 2207 | GLsizei count, |
| 2208 | GLenum type, |
| 2209 | GLuint offset, |
| 2210 | uint32_t result_shm_id, |
| 2211 | uint32_t result_shm_offset) { |
| 2212 | gles2::cmds::GetMaxValueInBufferCHROMIUM* c = |
| 2213 | GetCmdSpace<gles2::cmds::GetMaxValueInBufferCHROMIUM>(); |
| 2214 | if (c) { |
| 2215 | c->Init(buffer_id, count, type, offset, result_shm_id, result_shm_offset); |
| 2216 | } |
| 2217 | } |
| 2218 | |
| 2219 | void EnableFeatureCHROMIUM(GLuint bucket_id, |
| 2220 | uint32_t result_shm_id, |
| 2221 | uint32_t result_shm_offset) { |
| 2222 | gles2::cmds::EnableFeatureCHROMIUM* c = |
| 2223 | GetCmdSpace<gles2::cmds::EnableFeatureCHROMIUM>(); |
| 2224 | if (c) { |
| 2225 | c->Init(bucket_id, result_shm_id, result_shm_offset); |
| 2226 | } |
| 2227 | } |
| 2228 | |
| 2229 | void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) { |
| 2230 | gles2::cmds::ResizeCHROMIUM* c = GetCmdSpace<gles2::cmds::ResizeCHROMIUM>(); |
| 2231 | if (c) { |
| 2232 | c->Init(width, height, scale_factor); |
| 2233 | } |
| 2234 | } |
| 2235 | |
| 2236 | void GetRequestableExtensionsCHROMIUM(uint32_t bucket_id) { |
| 2237 | gles2::cmds::GetRequestableExtensionsCHROMIUM* c = |
| 2238 | GetCmdSpace<gles2::cmds::GetRequestableExtensionsCHROMIUM>(); |
| 2239 | if (c) { |
| 2240 | c->Init(bucket_id); |
| 2241 | } |
| 2242 | } |
| 2243 | |
| 2244 | void RequestExtensionCHROMIUM(uint32_t bucket_id) { |
| 2245 | gles2::cmds::RequestExtensionCHROMIUM* c = |
| 2246 | GetCmdSpace<gles2::cmds::RequestExtensionCHROMIUM>(); |
| 2247 | if (c) { |
| 2248 | c->Init(bucket_id); |
| 2249 | } |
| 2250 | } |
| 2251 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2252 | void GetProgramInfoCHROMIUM(GLuint program, uint32_t bucket_id) { |
| 2253 | gles2::cmds::GetProgramInfoCHROMIUM* c = |
| 2254 | GetCmdSpace<gles2::cmds::GetProgramInfoCHROMIUM>(); |
| 2255 | if (c) { |
| 2256 | c->Init(program, bucket_id); |
| 2257 | } |
| 2258 | } |
| 2259 | |
James Robinson | 7b766f4 | 2015-02-06 15:14:04 -0800 | [diff] [blame] | 2260 | void GetUniformBlocksCHROMIUM(GLuint program, uint32_t bucket_id) { |
| 2261 | gles2::cmds::GetUniformBlocksCHROMIUM* c = |
| 2262 | GetCmdSpace<gles2::cmds::GetUniformBlocksCHROMIUM>(); |
| 2263 | if (c) { |
| 2264 | c->Init(program, bucket_id); |
| 2265 | } |
| 2266 | } |
| 2267 | |
Etienne Membrives | 386015a | 2015-02-19 17:27:12 +0100 | [diff] [blame] | 2268 | void GetTransformFeedbackVaryingsCHROMIUM(GLuint program, uint32_t bucket_id) { |
| 2269 | gles2::cmds::GetTransformFeedbackVaryingsCHROMIUM* c = |
| 2270 | GetCmdSpace<gles2::cmds::GetTransformFeedbackVaryingsCHROMIUM>(); |
| 2271 | if (c) { |
| 2272 | c->Init(program, bucket_id); |
| 2273 | } |
| 2274 | } |
| 2275 | |
| 2276 | void GetUniformsES3CHROMIUM(GLuint program, uint32_t bucket_id) { |
| 2277 | gles2::cmds::GetUniformsES3CHROMIUM* c = |
| 2278 | GetCmdSpace<gles2::cmds::GetUniformsES3CHROMIUM>(); |
| 2279 | if (c) { |
| 2280 | c->Init(program, bucket_id); |
| 2281 | } |
| 2282 | } |
| 2283 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2284 | void GetTranslatedShaderSourceANGLE(GLuint shader, uint32_t bucket_id) { |
| 2285 | gles2::cmds::GetTranslatedShaderSourceANGLE* c = |
| 2286 | GetCmdSpace<gles2::cmds::GetTranslatedShaderSourceANGLE>(); |
| 2287 | if (c) { |
| 2288 | c->Init(shader, bucket_id); |
| 2289 | } |
| 2290 | } |
| 2291 | |
| 2292 | void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) { |
| 2293 | gles2::cmds::PostSubBufferCHROMIUM* c = |
| 2294 | GetCmdSpace<gles2::cmds::PostSubBufferCHROMIUM>(); |
| 2295 | if (c) { |
| 2296 | c->Init(x, y, width, height); |
| 2297 | } |
| 2298 | } |
| 2299 | |
| 2300 | void TexImageIOSurface2DCHROMIUM(GLenum target, |
| 2301 | GLsizei width, |
| 2302 | GLsizei height, |
| 2303 | GLuint ioSurfaceId, |
| 2304 | GLuint plane) { |
| 2305 | gles2::cmds::TexImageIOSurface2DCHROMIUM* c = |
| 2306 | GetCmdSpace<gles2::cmds::TexImageIOSurface2DCHROMIUM>(); |
| 2307 | if (c) { |
| 2308 | c->Init(target, width, height, ioSurfaceId, plane); |
| 2309 | } |
| 2310 | } |
| 2311 | |
| 2312 | void CopyTextureCHROMIUM(GLenum target, |
| 2313 | GLenum source_id, |
| 2314 | GLenum dest_id, |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2315 | GLint internalformat, |
| 2316 | GLenum dest_type) { |
| 2317 | gles2::cmds::CopyTextureCHROMIUM* c = |
| 2318 | GetCmdSpace<gles2::cmds::CopyTextureCHROMIUM>(); |
| 2319 | if (c) { |
Dave Moore | cc0e4f9 | 2015-03-10 15:23:04 -0700 | [diff] [blame^] | 2320 | c->Init(target, source_id, dest_id, internalformat, dest_type); |
| 2321 | } |
| 2322 | } |
| 2323 | |
| 2324 | void CopySubTextureCHROMIUM(GLenum target, |
| 2325 | GLenum source_id, |
| 2326 | GLenum dest_id, |
| 2327 | GLint xoffset, |
| 2328 | GLint yoffset) { |
| 2329 | gles2::cmds::CopySubTextureCHROMIUM* c = |
| 2330 | GetCmdSpace<gles2::cmds::CopySubTextureCHROMIUM>(); |
| 2331 | if (c) { |
| 2332 | c->Init(target, source_id, dest_id, xoffset, yoffset); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2333 | } |
| 2334 | } |
| 2335 | |
| 2336 | void DrawArraysInstancedANGLE(GLenum mode, |
| 2337 | GLint first, |
| 2338 | GLsizei count, |
| 2339 | GLsizei primcount) { |
| 2340 | gles2::cmds::DrawArraysInstancedANGLE* c = |
| 2341 | GetCmdSpace<gles2::cmds::DrawArraysInstancedANGLE>(); |
| 2342 | if (c) { |
| 2343 | c->Init(mode, first, count, primcount); |
| 2344 | } |
| 2345 | } |
| 2346 | |
| 2347 | void DrawElementsInstancedANGLE(GLenum mode, |
| 2348 | GLsizei count, |
| 2349 | GLenum type, |
| 2350 | GLuint index_offset, |
| 2351 | GLsizei primcount) { |
| 2352 | gles2::cmds::DrawElementsInstancedANGLE* c = |
| 2353 | GetCmdSpace<gles2::cmds::DrawElementsInstancedANGLE>(); |
| 2354 | if (c) { |
| 2355 | c->Init(mode, count, type, index_offset, primcount); |
| 2356 | } |
| 2357 | } |
| 2358 | |
| 2359 | void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) { |
| 2360 | gles2::cmds::VertexAttribDivisorANGLE* c = |
| 2361 | GetCmdSpace<gles2::cmds::VertexAttribDivisorANGLE>(); |
| 2362 | if (c) { |
| 2363 | c->Init(index, divisor); |
| 2364 | } |
| 2365 | } |
| 2366 | |
| 2367 | void ProduceTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) { |
| 2368 | const uint32_t size = |
| 2369 | gles2::cmds::ProduceTextureCHROMIUMImmediate::ComputeSize(); |
| 2370 | gles2::cmds::ProduceTextureCHROMIUMImmediate* c = |
| 2371 | GetImmediateCmdSpaceTotalSize< |
| 2372 | gles2::cmds::ProduceTextureCHROMIUMImmediate>(size); |
| 2373 | if (c) { |
| 2374 | c->Init(target, mailbox); |
| 2375 | } |
| 2376 | } |
| 2377 | |
| 2378 | void ProduceTextureDirectCHROMIUMImmediate(GLuint texture, |
| 2379 | GLenum target, |
| 2380 | const GLbyte* mailbox) { |
| 2381 | const uint32_t size = |
| 2382 | gles2::cmds::ProduceTextureDirectCHROMIUMImmediate::ComputeSize(); |
| 2383 | gles2::cmds::ProduceTextureDirectCHROMIUMImmediate* c = |
| 2384 | GetImmediateCmdSpaceTotalSize< |
| 2385 | gles2::cmds::ProduceTextureDirectCHROMIUMImmediate>(size); |
| 2386 | if (c) { |
| 2387 | c->Init(texture, target, mailbox); |
| 2388 | } |
| 2389 | } |
| 2390 | |
| 2391 | void ConsumeTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) { |
| 2392 | const uint32_t size = |
| 2393 | gles2::cmds::ConsumeTextureCHROMIUMImmediate::ComputeSize(); |
| 2394 | gles2::cmds::ConsumeTextureCHROMIUMImmediate* c = |
| 2395 | GetImmediateCmdSpaceTotalSize< |
| 2396 | gles2::cmds::ConsumeTextureCHROMIUMImmediate>(size); |
| 2397 | if (c) { |
| 2398 | c->Init(target, mailbox); |
| 2399 | } |
| 2400 | } |
| 2401 | |
| 2402 | void BindUniformLocationCHROMIUMBucket(GLuint program, |
| 2403 | GLint location, |
| 2404 | uint32_t name_bucket_id) { |
| 2405 | gles2::cmds::BindUniformLocationCHROMIUMBucket* c = |
| 2406 | GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUMBucket>(); |
| 2407 | if (c) { |
| 2408 | c->Init(program, location, name_bucket_id); |
| 2409 | } |
| 2410 | } |
| 2411 | |
James Robinson | 6e9a1c9 | 2014-11-13 17:05:42 -0800 | [diff] [blame] | 2412 | void GenValuebuffersCHROMIUMImmediate(GLsizei n, GLuint* buffers) { |
| 2413 | const uint32_t size = |
| 2414 | gles2::cmds::GenValuebuffersCHROMIUMImmediate::ComputeSize(n); |
| 2415 | gles2::cmds::GenValuebuffersCHROMIUMImmediate* c = |
| 2416 | GetImmediateCmdSpaceTotalSize< |
| 2417 | gles2::cmds::GenValuebuffersCHROMIUMImmediate>(size); |
| 2418 | if (c) { |
| 2419 | c->Init(n, buffers); |
| 2420 | } |
| 2421 | } |
| 2422 | |
| 2423 | void DeleteValuebuffersCHROMIUMImmediate(GLsizei n, |
| 2424 | const GLuint* valuebuffers) { |
| 2425 | const uint32_t size = |
| 2426 | gles2::cmds::DeleteValuebuffersCHROMIUMImmediate::ComputeSize(n); |
| 2427 | gles2::cmds::DeleteValuebuffersCHROMIUMImmediate* c = |
| 2428 | GetImmediateCmdSpaceTotalSize< |
| 2429 | gles2::cmds::DeleteValuebuffersCHROMIUMImmediate>(size); |
| 2430 | if (c) { |
| 2431 | c->Init(n, valuebuffers); |
| 2432 | } |
| 2433 | } |
| 2434 | |
| 2435 | void IsValuebufferCHROMIUM(GLuint valuebuffer, |
| 2436 | uint32_t result_shm_id, |
| 2437 | uint32_t result_shm_offset) { |
| 2438 | gles2::cmds::IsValuebufferCHROMIUM* c = |
| 2439 | GetCmdSpace<gles2::cmds::IsValuebufferCHROMIUM>(); |
| 2440 | if (c) { |
| 2441 | c->Init(valuebuffer, result_shm_id, result_shm_offset); |
| 2442 | } |
| 2443 | } |
| 2444 | |
| 2445 | void BindValuebufferCHROMIUM(GLenum target, GLuint valuebuffer) { |
| 2446 | gles2::cmds::BindValuebufferCHROMIUM* c = |
| 2447 | GetCmdSpace<gles2::cmds::BindValuebufferCHROMIUM>(); |
| 2448 | if (c) { |
| 2449 | c->Init(target, valuebuffer); |
| 2450 | } |
| 2451 | } |
| 2452 | |
| 2453 | void SubscribeValueCHROMIUM(GLenum target, GLenum subscription) { |
| 2454 | gles2::cmds::SubscribeValueCHROMIUM* c = |
| 2455 | GetCmdSpace<gles2::cmds::SubscribeValueCHROMIUM>(); |
| 2456 | if (c) { |
| 2457 | c->Init(target, subscription); |
| 2458 | } |
| 2459 | } |
| 2460 | |
| 2461 | void PopulateSubscribedValuesCHROMIUM(GLenum target) { |
| 2462 | gles2::cmds::PopulateSubscribedValuesCHROMIUM* c = |
| 2463 | GetCmdSpace<gles2::cmds::PopulateSubscribedValuesCHROMIUM>(); |
| 2464 | if (c) { |
| 2465 | c->Init(target); |
| 2466 | } |
| 2467 | } |
| 2468 | |
| 2469 | void UniformValuebufferCHROMIUM(GLint location, |
| 2470 | GLenum target, |
| 2471 | GLenum subscription) { |
| 2472 | gles2::cmds::UniformValuebufferCHROMIUM* c = |
| 2473 | GetCmdSpace<gles2::cmds::UniformValuebufferCHROMIUM>(); |
| 2474 | if (c) { |
| 2475 | c->Init(location, target, subscription); |
| 2476 | } |
| 2477 | } |
| 2478 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2479 | void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) { |
| 2480 | gles2::cmds::BindTexImage2DCHROMIUM* c = |
| 2481 | GetCmdSpace<gles2::cmds::BindTexImage2DCHROMIUM>(); |
| 2482 | if (c) { |
| 2483 | c->Init(target, imageId); |
| 2484 | } |
| 2485 | } |
| 2486 | |
| 2487 | void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) { |
| 2488 | gles2::cmds::ReleaseTexImage2DCHROMIUM* c = |
| 2489 | GetCmdSpace<gles2::cmds::ReleaseTexImage2DCHROMIUM>(); |
| 2490 | if (c) { |
| 2491 | c->Init(target, imageId); |
| 2492 | } |
| 2493 | } |
| 2494 | |
Przemyslaw Pietrzkiewicz | ea77f0b | 2014-12-10 15:35:08 +0100 | [diff] [blame] | 2495 | void TraceBeginCHROMIUM(GLuint category_bucket_id, GLuint name_bucket_id) { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2496 | gles2::cmds::TraceBeginCHROMIUM* c = |
| 2497 | GetCmdSpace<gles2::cmds::TraceBeginCHROMIUM>(); |
| 2498 | if (c) { |
Przemyslaw Pietrzkiewicz | ea77f0b | 2014-12-10 15:35:08 +0100 | [diff] [blame] | 2499 | c->Init(category_bucket_id, name_bucket_id); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2500 | } |
| 2501 | } |
| 2502 | |
| 2503 | void TraceEndCHROMIUM() { |
| 2504 | gles2::cmds::TraceEndCHROMIUM* c = |
| 2505 | GetCmdSpace<gles2::cmds::TraceEndCHROMIUM>(); |
| 2506 | if (c) { |
| 2507 | c->Init(); |
| 2508 | } |
| 2509 | } |
| 2510 | |
| 2511 | void AsyncTexSubImage2DCHROMIUM(GLenum target, |
| 2512 | GLint level, |
| 2513 | GLint xoffset, |
| 2514 | GLint yoffset, |
| 2515 | GLsizei width, |
| 2516 | GLsizei height, |
| 2517 | GLenum format, |
| 2518 | GLenum type, |
| 2519 | uint32_t data_shm_id, |
| 2520 | uint32_t data_shm_offset, |
| 2521 | uint32_t async_upload_token, |
| 2522 | uint32_t sync_data_shm_id, |
| 2523 | uint32_t sync_data_shm_offset) { |
| 2524 | gles2::cmds::AsyncTexSubImage2DCHROMIUM* c = |
| 2525 | GetCmdSpace<gles2::cmds::AsyncTexSubImage2DCHROMIUM>(); |
| 2526 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 2527 | c->Init(target, level, xoffset, yoffset, width, height, format, type, |
| 2528 | data_shm_id, data_shm_offset, async_upload_token, sync_data_shm_id, |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2529 | sync_data_shm_offset); |
| 2530 | } |
| 2531 | } |
| 2532 | |
| 2533 | void AsyncTexImage2DCHROMIUM(GLenum target, |
| 2534 | GLint level, |
| 2535 | GLint internalformat, |
| 2536 | GLsizei width, |
| 2537 | GLsizei height, |
| 2538 | GLenum format, |
| 2539 | GLenum type, |
| 2540 | uint32_t pixels_shm_id, |
| 2541 | uint32_t pixels_shm_offset, |
| 2542 | uint32_t async_upload_token, |
| 2543 | uint32_t sync_data_shm_id, |
| 2544 | uint32_t sync_data_shm_offset) { |
| 2545 | gles2::cmds::AsyncTexImage2DCHROMIUM* c = |
| 2546 | GetCmdSpace<gles2::cmds::AsyncTexImage2DCHROMIUM>(); |
| 2547 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 2548 | c->Init(target, level, internalformat, width, height, format, type, |
| 2549 | pixels_shm_id, pixels_shm_offset, async_upload_token, |
| 2550 | sync_data_shm_id, sync_data_shm_offset); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2551 | } |
| 2552 | } |
| 2553 | |
| 2554 | void WaitAsyncTexImage2DCHROMIUM(GLenum target) { |
| 2555 | gles2::cmds::WaitAsyncTexImage2DCHROMIUM* c = |
| 2556 | GetCmdSpace<gles2::cmds::WaitAsyncTexImage2DCHROMIUM>(); |
| 2557 | if (c) { |
| 2558 | c->Init(target); |
| 2559 | } |
| 2560 | } |
| 2561 | |
| 2562 | void WaitAllAsyncTexImage2DCHROMIUM() { |
| 2563 | gles2::cmds::WaitAllAsyncTexImage2DCHROMIUM* c = |
| 2564 | GetCmdSpace<gles2::cmds::WaitAllAsyncTexImage2DCHROMIUM>(); |
| 2565 | if (c) { |
| 2566 | c->Init(); |
| 2567 | } |
| 2568 | } |
| 2569 | |
| 2570 | void DiscardFramebufferEXTImmediate(GLenum target, |
| 2571 | GLsizei count, |
| 2572 | const GLenum* attachments) { |
| 2573 | const uint32_t size = |
| 2574 | gles2::cmds::DiscardFramebufferEXTImmediate::ComputeSize(count); |
| 2575 | gles2::cmds::DiscardFramebufferEXTImmediate* c = |
| 2576 | GetImmediateCmdSpaceTotalSize< |
| 2577 | gles2::cmds::DiscardFramebufferEXTImmediate>(size); |
| 2578 | if (c) { |
| 2579 | c->Init(target, count, attachments); |
| 2580 | } |
| 2581 | } |
| 2582 | |
| 2583 | void LoseContextCHROMIUM(GLenum current, GLenum other) { |
| 2584 | gles2::cmds::LoseContextCHROMIUM* c = |
| 2585 | GetCmdSpace<gles2::cmds::LoseContextCHROMIUM>(); |
| 2586 | if (c) { |
| 2587 | c->Init(current, other); |
| 2588 | } |
| 2589 | } |
| 2590 | |
| 2591 | void WaitSyncPointCHROMIUM(GLuint sync_point) { |
| 2592 | gles2::cmds::WaitSyncPointCHROMIUM* c = |
| 2593 | GetCmdSpace<gles2::cmds::WaitSyncPointCHROMIUM>(); |
| 2594 | if (c) { |
| 2595 | c->Init(sync_point); |
| 2596 | } |
| 2597 | } |
| 2598 | |
| 2599 | void DrawBuffersEXTImmediate(GLsizei count, const GLenum* bufs) { |
| 2600 | const uint32_t size = |
| 2601 | gles2::cmds::DrawBuffersEXTImmediate::ComputeSize(count); |
| 2602 | gles2::cmds::DrawBuffersEXTImmediate* c = |
| 2603 | GetImmediateCmdSpaceTotalSize<gles2::cmds::DrawBuffersEXTImmediate>(size); |
| 2604 | if (c) { |
| 2605 | c->Init(count, bufs); |
| 2606 | } |
| 2607 | } |
| 2608 | |
| 2609 | void DiscardBackbufferCHROMIUM() { |
| 2610 | gles2::cmds::DiscardBackbufferCHROMIUM* c = |
| 2611 | GetCmdSpace<gles2::cmds::DiscardBackbufferCHROMIUM>(); |
| 2612 | if (c) { |
| 2613 | c->Init(); |
| 2614 | } |
| 2615 | } |
| 2616 | |
| 2617 | void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order, |
| 2618 | GLenum plane_transform, |
| 2619 | GLuint overlay_texture_id, |
| 2620 | GLint bounds_x, |
| 2621 | GLint bounds_y, |
| 2622 | GLint bounds_width, |
| 2623 | GLint bounds_height, |
| 2624 | GLfloat uv_x, |
| 2625 | GLfloat uv_y, |
| 2626 | GLfloat uv_width, |
| 2627 | GLfloat uv_height) { |
| 2628 | gles2::cmds::ScheduleOverlayPlaneCHROMIUM* c = |
| 2629 | GetCmdSpace<gles2::cmds::ScheduleOverlayPlaneCHROMIUM>(); |
| 2630 | if (c) { |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 2631 | c->Init(plane_z_order, plane_transform, overlay_texture_id, bounds_x, |
| 2632 | bounds_y, bounds_width, bounds_height, uv_x, uv_y, uv_width, |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2633 | uv_height); |
| 2634 | } |
| 2635 | } |
| 2636 | |
Przemyslaw Pietrzkiewicz | ea77f0b | 2014-12-10 15:35:08 +0100 | [diff] [blame] | 2637 | void SwapInterval(GLint interval) { |
| 2638 | gles2::cmds::SwapInterval* c = GetCmdSpace<gles2::cmds::SwapInterval>(); |
| 2639 | if (c) { |
| 2640 | c->Init(interval); |
| 2641 | } |
| 2642 | } |
| 2643 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2644 | void MatrixLoadfCHROMIUMImmediate(GLenum matrixMode, const GLfloat* m) { |
| 2645 | const uint32_t size = |
| 2646 | gles2::cmds::MatrixLoadfCHROMIUMImmediate::ComputeSize(); |
| 2647 | gles2::cmds::MatrixLoadfCHROMIUMImmediate* c = |
| 2648 | GetImmediateCmdSpaceTotalSize<gles2::cmds::MatrixLoadfCHROMIUMImmediate>( |
| 2649 | size); |
| 2650 | if (c) { |
| 2651 | c->Init(matrixMode, m); |
| 2652 | } |
| 2653 | } |
| 2654 | |
| 2655 | void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) { |
| 2656 | gles2::cmds::MatrixLoadIdentityCHROMIUM* c = |
| 2657 | GetCmdSpace<gles2::cmds::MatrixLoadIdentityCHROMIUM>(); |
| 2658 | if (c) { |
| 2659 | c->Init(matrixMode); |
| 2660 | } |
| 2661 | } |
| 2662 | |
James Robinson | 30d547e | 2014-10-23 18:20:06 -0700 | [diff] [blame] | 2663 | void BlendBarrierKHR() { |
| 2664 | gles2::cmds::BlendBarrierKHR* c = GetCmdSpace<gles2::cmds::BlendBarrierKHR>(); |
| 2665 | if (c) { |
| 2666 | c->Init(); |
| 2667 | } |
| 2668 | } |
| 2669 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 2670 | #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ |