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