summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/common
diff options
context:
space:
mode:
authorzmo <zmo@chromium.org>2015-05-14 12:13:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-14 19:14:10 +0000
commit5ee097e78c8c254607c02ee7614bba0abe41d956 (patch)
tree2eb60bf5914c1eb0bda2191d523afbc75349fee3 /gpu/command_buffer/common
parent55c68a9a9aecbdc22fd06a99aa93b98881405d88 (diff)
downloadchromium_src-5ee097e78c8c254607c02ee7614bba0abe41d956.zip
chromium_src-5ee097e78c8c254607c02ee7614bba0abe41d956.tar.gz
chromium_src-5ee097e78c8c254607c02ee7614bba0abe41d956.tar.bz2
Add ES3 commands GetVertexAttribI{u}iv to GPU command buffer.
BUG=429053 TEST=gpu_unittests R=piman@chromium.org Review URL: https://codereview.chromium.org/1136713003 Cr-Commit-Position: refs/heads/master@{#329892}
Diffstat (limited to 'gpu/command_buffer/common')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_autogen.h110
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_test_autogen.h30
-rw-r--r--gpu/command_buffer/common/gles2_cmd_ids_autogen.h342
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc6
4 files changed, 317 insertions, 171 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 9775d68..c25d9d2 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -5848,6 +5848,116 @@ static_assert(offsetof(GetVertexAttribiv, params_shm_id) == 12,
static_assert(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
"offset of GetVertexAttribiv params_shm_offset should be 16");
+struct GetVertexAttribIiv {
+ typedef GetVertexAttribIiv ValueType;
+ static const CommandId kCmdId = kGetVertexAttribIiv;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ typedef SizedResult<GLint> Result;
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLuint _index,
+ GLenum _pname,
+ uint32_t _params_shm_id,
+ uint32_t _params_shm_offset) {
+ SetHeader();
+ index = _index;
+ pname = _pname;
+ params_shm_id = _params_shm_id;
+ params_shm_offset = _params_shm_offset;
+ }
+
+ void* Set(void* cmd,
+ GLuint _index,
+ GLenum _pname,
+ uint32_t _params_shm_id,
+ uint32_t _params_shm_offset) {
+ static_cast<ValueType*>(cmd)
+ ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t index;
+ uint32_t pname;
+ uint32_t params_shm_id;
+ uint32_t params_shm_offset;
+};
+
+static_assert(sizeof(GetVertexAttribIiv) == 20,
+ "size of GetVertexAttribIiv should be 20");
+static_assert(offsetof(GetVertexAttribIiv, header) == 0,
+ "offset of GetVertexAttribIiv header should be 0");
+static_assert(offsetof(GetVertexAttribIiv, index) == 4,
+ "offset of GetVertexAttribIiv index should be 4");
+static_assert(offsetof(GetVertexAttribIiv, pname) == 8,
+ "offset of GetVertexAttribIiv pname should be 8");
+static_assert(offsetof(GetVertexAttribIiv, params_shm_id) == 12,
+ "offset of GetVertexAttribIiv params_shm_id should be 12");
+static_assert(offsetof(GetVertexAttribIiv, params_shm_offset) == 16,
+ "offset of GetVertexAttribIiv params_shm_offset should be 16");
+
+struct GetVertexAttribIuiv {
+ typedef GetVertexAttribIuiv ValueType;
+ static const CommandId kCmdId = kGetVertexAttribIuiv;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ typedef SizedResult<GLuint> Result;
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLuint _index,
+ GLenum _pname,
+ uint32_t _params_shm_id,
+ uint32_t _params_shm_offset) {
+ SetHeader();
+ index = _index;
+ pname = _pname;
+ params_shm_id = _params_shm_id;
+ params_shm_offset = _params_shm_offset;
+ }
+
+ void* Set(void* cmd,
+ GLuint _index,
+ GLenum _pname,
+ uint32_t _params_shm_id,
+ uint32_t _params_shm_offset) {
+ static_cast<ValueType*>(cmd)
+ ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t index;
+ uint32_t pname;
+ uint32_t params_shm_id;
+ uint32_t params_shm_offset;
+};
+
+static_assert(sizeof(GetVertexAttribIuiv) == 20,
+ "size of GetVertexAttribIuiv should be 20");
+static_assert(offsetof(GetVertexAttribIuiv, header) == 0,
+ "offset of GetVertexAttribIuiv header should be 0");
+static_assert(offsetof(GetVertexAttribIuiv, index) == 4,
+ "offset of GetVertexAttribIuiv index should be 4");
+static_assert(offsetof(GetVertexAttribIuiv, pname) == 8,
+ "offset of GetVertexAttribIuiv pname should be 8");
+static_assert(offsetof(GetVertexAttribIuiv, params_shm_id) == 12,
+ "offset of GetVertexAttribIuiv params_shm_id should be 12");
+static_assert(offsetof(GetVertexAttribIuiv, params_shm_offset) == 16,
+ "offset of GetVertexAttribIuiv params_shm_offset should be 16");
+
struct GetVertexAttribPointerv {
typedef GetVertexAttribPointerv ValueType;
static const CommandId kCmdId = kGetVertexAttribPointerv;
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 620d2a1..ad56c24 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -1778,6 +1778,36 @@ TEST_F(GLES2FormatTest, GetVertexAttribiv) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, GetVertexAttribIiv) {
+ cmds::GetVertexAttribIiv& cmd = *GetBufferAs<cmds::GetVertexAttribIiv>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLenum>(12),
+ static_cast<uint32_t>(13), static_cast<uint32_t>(14));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::GetVertexAttribIiv::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.index);
+ EXPECT_EQ(static_cast<GLenum>(12), cmd.pname);
+ EXPECT_EQ(static_cast<uint32_t>(13), cmd.params_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(14), cmd.params_shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, GetVertexAttribIuiv) {
+ cmds::GetVertexAttribIuiv& cmd = *GetBufferAs<cmds::GetVertexAttribIuiv>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLenum>(12),
+ static_cast<uint32_t>(13), static_cast<uint32_t>(14));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::GetVertexAttribIuiv::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.index);
+ EXPECT_EQ(static_cast<GLenum>(12), cmd.pname);
+ EXPECT_EQ(static_cast<uint32_t>(13), cmd.params_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(14), cmd.params_shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, GetVertexAttribPointerv) {
cmds::GetVertexAttribPointerv& cmd =
*GetBufferAs<cmds::GetVertexAttribPointerv>();
diff --git a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index dcc1a14..ba8f073 100644
--- a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -130,176 +130,178 @@
OP(GetUniformLocation) /* 371 */ \
OP(GetVertexAttribfv) /* 372 */ \
OP(GetVertexAttribiv) /* 373 */ \
- OP(GetVertexAttribPointerv) /* 374 */ \
- OP(Hint) /* 375 */ \
- OP(InvalidateFramebufferImmediate) /* 376 */ \
- OP(InvalidateSubFramebufferImmediate) /* 377 */ \
- OP(IsBuffer) /* 378 */ \
- OP(IsEnabled) /* 379 */ \
- OP(IsFramebuffer) /* 380 */ \
- OP(IsProgram) /* 381 */ \
- OP(IsRenderbuffer) /* 382 */ \
- OP(IsSampler) /* 383 */ \
- OP(IsShader) /* 384 */ \
- OP(IsSync) /* 385 */ \
- OP(IsTexture) /* 386 */ \
- OP(IsTransformFeedback) /* 387 */ \
- OP(LineWidth) /* 388 */ \
- OP(LinkProgram) /* 389 */ \
- OP(PauseTransformFeedback) /* 390 */ \
- OP(PixelStorei) /* 391 */ \
- OP(PolygonOffset) /* 392 */ \
- OP(ReadBuffer) /* 393 */ \
- OP(ReadPixels) /* 394 */ \
- OP(ReleaseShaderCompiler) /* 395 */ \
- OP(RenderbufferStorage) /* 396 */ \
- OP(ResumeTransformFeedback) /* 397 */ \
- OP(SampleCoverage) /* 398 */ \
- OP(SamplerParameterf) /* 399 */ \
- OP(SamplerParameterfvImmediate) /* 400 */ \
- OP(SamplerParameteri) /* 401 */ \
- OP(SamplerParameterivImmediate) /* 402 */ \
- OP(Scissor) /* 403 */ \
- OP(ShaderBinary) /* 404 */ \
- OP(ShaderSourceBucket) /* 405 */ \
- OP(StencilFunc) /* 406 */ \
- OP(StencilFuncSeparate) /* 407 */ \
- OP(StencilMask) /* 408 */ \
- OP(StencilMaskSeparate) /* 409 */ \
- OP(StencilOp) /* 410 */ \
- OP(StencilOpSeparate) /* 411 */ \
- OP(TexImage2D) /* 412 */ \
- OP(TexImage3D) /* 413 */ \
- OP(TexParameterf) /* 414 */ \
- OP(TexParameterfvImmediate) /* 415 */ \
- OP(TexParameteri) /* 416 */ \
- OP(TexParameterivImmediate) /* 417 */ \
- OP(TexStorage3D) /* 418 */ \
- OP(TexSubImage2D) /* 419 */ \
- OP(TexSubImage3D) /* 420 */ \
- OP(TransformFeedbackVaryingsBucket) /* 421 */ \
- OP(Uniform1f) /* 422 */ \
- OP(Uniform1fvImmediate) /* 423 */ \
- OP(Uniform1i) /* 424 */ \
- OP(Uniform1ivImmediate) /* 425 */ \
- OP(Uniform1ui) /* 426 */ \
- OP(Uniform1uivImmediate) /* 427 */ \
- OP(Uniform2f) /* 428 */ \
- OP(Uniform2fvImmediate) /* 429 */ \
- OP(Uniform2i) /* 430 */ \
- OP(Uniform2ivImmediate) /* 431 */ \
- OP(Uniform2ui) /* 432 */ \
- OP(Uniform2uivImmediate) /* 433 */ \
- OP(Uniform3f) /* 434 */ \
- OP(Uniform3fvImmediate) /* 435 */ \
- OP(Uniform3i) /* 436 */ \
- OP(Uniform3ivImmediate) /* 437 */ \
- OP(Uniform3ui) /* 438 */ \
- OP(Uniform3uivImmediate) /* 439 */ \
- OP(Uniform4f) /* 440 */ \
- OP(Uniform4fvImmediate) /* 441 */ \
- OP(Uniform4i) /* 442 */ \
- OP(Uniform4ivImmediate) /* 443 */ \
- OP(Uniform4ui) /* 444 */ \
- OP(Uniform4uivImmediate) /* 445 */ \
- OP(UniformBlockBinding) /* 446 */ \
- OP(UniformMatrix2fvImmediate) /* 447 */ \
- OP(UniformMatrix2x3fvImmediate) /* 448 */ \
- OP(UniformMatrix2x4fvImmediate) /* 449 */ \
- OP(UniformMatrix3fvImmediate) /* 450 */ \
- OP(UniformMatrix3x2fvImmediate) /* 451 */ \
- OP(UniformMatrix3x4fvImmediate) /* 452 */ \
- OP(UniformMatrix4fvImmediate) /* 453 */ \
- OP(UniformMatrix4x2fvImmediate) /* 454 */ \
- OP(UniformMatrix4x3fvImmediate) /* 455 */ \
- OP(UseProgram) /* 456 */ \
- OP(ValidateProgram) /* 457 */ \
- OP(VertexAttrib1f) /* 458 */ \
- OP(VertexAttrib1fvImmediate) /* 459 */ \
- OP(VertexAttrib2f) /* 460 */ \
- OP(VertexAttrib2fvImmediate) /* 461 */ \
- OP(VertexAttrib3f) /* 462 */ \
- OP(VertexAttrib3fvImmediate) /* 463 */ \
- OP(VertexAttrib4f) /* 464 */ \
- OP(VertexAttrib4fvImmediate) /* 465 */ \
- OP(VertexAttribI4i) /* 466 */ \
- OP(VertexAttribI4ivImmediate) /* 467 */ \
- OP(VertexAttribI4ui) /* 468 */ \
- OP(VertexAttribI4uivImmediate) /* 469 */ \
- OP(VertexAttribIPointer) /* 470 */ \
- OP(VertexAttribPointer) /* 471 */ \
- OP(Viewport) /* 472 */ \
- OP(WaitSync) /* 473 */ \
- OP(BlitFramebufferCHROMIUM) /* 474 */ \
- OP(RenderbufferStorageMultisampleCHROMIUM) /* 475 */ \
- OP(RenderbufferStorageMultisampleEXT) /* 476 */ \
- OP(FramebufferTexture2DMultisampleEXT) /* 477 */ \
- OP(TexStorage2DEXT) /* 478 */ \
- OP(GenQueriesEXTImmediate) /* 479 */ \
- OP(DeleteQueriesEXTImmediate) /* 480 */ \
- OP(BeginQueryEXT) /* 481 */ \
- OP(BeginTransformFeedback) /* 482 */ \
- OP(EndQueryEXT) /* 483 */ \
- OP(EndTransformFeedback) /* 484 */ \
- OP(InsertEventMarkerEXT) /* 485 */ \
- OP(PushGroupMarkerEXT) /* 486 */ \
- OP(PopGroupMarkerEXT) /* 487 */ \
- OP(GenVertexArraysOESImmediate) /* 488 */ \
- OP(DeleteVertexArraysOESImmediate) /* 489 */ \
- OP(IsVertexArrayOES) /* 490 */ \
- OP(BindVertexArrayOES) /* 491 */ \
- OP(SwapBuffers) /* 492 */ \
- OP(GetMaxValueInBufferCHROMIUM) /* 493 */ \
- OP(EnableFeatureCHROMIUM) /* 494 */ \
- OP(MapBufferRange) /* 495 */ \
- OP(UnmapBuffer) /* 496 */ \
- OP(ResizeCHROMIUM) /* 497 */ \
- OP(GetRequestableExtensionsCHROMIUM) /* 498 */ \
- OP(RequestExtensionCHROMIUM) /* 499 */ \
- OP(GetProgramInfoCHROMIUM) /* 500 */ \
- OP(GetUniformBlocksCHROMIUM) /* 501 */ \
- OP(GetTransformFeedbackVaryingsCHROMIUM) /* 502 */ \
- OP(GetUniformsES3CHROMIUM) /* 503 */ \
- OP(GetTranslatedShaderSourceANGLE) /* 504 */ \
- OP(PostSubBufferCHROMIUM) /* 505 */ \
- OP(TexImageIOSurface2DCHROMIUM) /* 506 */ \
- OP(CopyTextureCHROMIUM) /* 507 */ \
- OP(CopySubTextureCHROMIUM) /* 508 */ \
- OP(DrawArraysInstancedANGLE) /* 509 */ \
- OP(DrawElementsInstancedANGLE) /* 510 */ \
- OP(VertexAttribDivisorANGLE) /* 511 */ \
- OP(GenMailboxCHROMIUM) /* 512 */ \
- OP(ProduceTextureCHROMIUMImmediate) /* 513 */ \
- OP(ProduceTextureDirectCHROMIUMImmediate) /* 514 */ \
- OP(ConsumeTextureCHROMIUMImmediate) /* 515 */ \
- OP(CreateAndConsumeTextureCHROMIUMImmediate) /* 516 */ \
- OP(BindUniformLocationCHROMIUMBucket) /* 517 */ \
- OP(GenValuebuffersCHROMIUMImmediate) /* 518 */ \
- OP(DeleteValuebuffersCHROMIUMImmediate) /* 519 */ \
- OP(IsValuebufferCHROMIUM) /* 520 */ \
- OP(BindValuebufferCHROMIUM) /* 521 */ \
- OP(SubscribeValueCHROMIUM) /* 522 */ \
- OP(PopulateSubscribedValuesCHROMIUM) /* 523 */ \
- OP(UniformValuebufferCHROMIUM) /* 524 */ \
- OP(BindTexImage2DCHROMIUM) /* 525 */ \
- OP(ReleaseTexImage2DCHROMIUM) /* 526 */ \
- OP(TraceBeginCHROMIUM) /* 527 */ \
- OP(TraceEndCHROMIUM) /* 528 */ \
- OP(AsyncTexSubImage2DCHROMIUM) /* 529 */ \
- OP(AsyncTexImage2DCHROMIUM) /* 530 */ \
- OP(WaitAsyncTexImage2DCHROMIUM) /* 531 */ \
- OP(WaitAllAsyncTexImage2DCHROMIUM) /* 532 */ \
- OP(DiscardFramebufferEXTImmediate) /* 533 */ \
- OP(LoseContextCHROMIUM) /* 534 */ \
- OP(InsertSyncPointCHROMIUM) /* 535 */ \
- OP(WaitSyncPointCHROMIUM) /* 536 */ \
- OP(DrawBuffersEXTImmediate) /* 537 */ \
- OP(DiscardBackbufferCHROMIUM) /* 538 */ \
- OP(ScheduleOverlayPlaneCHROMIUM) /* 539 */ \
- OP(SwapInterval) /* 540 */ \
- OP(MatrixLoadfCHROMIUMImmediate) /* 541 */ \
- OP(MatrixLoadIdentityCHROMIUM) /* 542 */ \
- OP(BlendBarrierKHR) /* 543 */
+ OP(GetVertexAttribIiv) /* 374 */ \
+ OP(GetVertexAttribIuiv) /* 375 */ \
+ OP(GetVertexAttribPointerv) /* 376 */ \
+ OP(Hint) /* 377 */ \
+ OP(InvalidateFramebufferImmediate) /* 378 */ \
+ OP(InvalidateSubFramebufferImmediate) /* 379 */ \
+ OP(IsBuffer) /* 380 */ \
+ OP(IsEnabled) /* 381 */ \
+ OP(IsFramebuffer) /* 382 */ \
+ OP(IsProgram) /* 383 */ \
+ OP(IsRenderbuffer) /* 384 */ \
+ OP(IsSampler) /* 385 */ \
+ OP(IsShader) /* 386 */ \
+ OP(IsSync) /* 387 */ \
+ OP(IsTexture) /* 388 */ \
+ OP(IsTransformFeedback) /* 389 */ \
+ OP(LineWidth) /* 390 */ \
+ OP(LinkProgram) /* 391 */ \
+ OP(PauseTransformFeedback) /* 392 */ \
+ OP(PixelStorei) /* 393 */ \
+ OP(PolygonOffset) /* 394 */ \
+ OP(ReadBuffer) /* 395 */ \
+ OP(ReadPixels) /* 396 */ \
+ OP(ReleaseShaderCompiler) /* 397 */ \
+ OP(RenderbufferStorage) /* 398 */ \
+ OP(ResumeTransformFeedback) /* 399 */ \
+ OP(SampleCoverage) /* 400 */ \
+ OP(SamplerParameterf) /* 401 */ \
+ OP(SamplerParameterfvImmediate) /* 402 */ \
+ OP(SamplerParameteri) /* 403 */ \
+ OP(SamplerParameterivImmediate) /* 404 */ \
+ OP(Scissor) /* 405 */ \
+ OP(ShaderBinary) /* 406 */ \
+ OP(ShaderSourceBucket) /* 407 */ \
+ OP(StencilFunc) /* 408 */ \
+ OP(StencilFuncSeparate) /* 409 */ \
+ OP(StencilMask) /* 410 */ \
+ OP(StencilMaskSeparate) /* 411 */ \
+ OP(StencilOp) /* 412 */ \
+ OP(StencilOpSeparate) /* 413 */ \
+ OP(TexImage2D) /* 414 */ \
+ OP(TexImage3D) /* 415 */ \
+ OP(TexParameterf) /* 416 */ \
+ OP(TexParameterfvImmediate) /* 417 */ \
+ OP(TexParameteri) /* 418 */ \
+ OP(TexParameterivImmediate) /* 419 */ \
+ OP(TexStorage3D) /* 420 */ \
+ OP(TexSubImage2D) /* 421 */ \
+ OP(TexSubImage3D) /* 422 */ \
+ OP(TransformFeedbackVaryingsBucket) /* 423 */ \
+ OP(Uniform1f) /* 424 */ \
+ OP(Uniform1fvImmediate) /* 425 */ \
+ OP(Uniform1i) /* 426 */ \
+ OP(Uniform1ivImmediate) /* 427 */ \
+ OP(Uniform1ui) /* 428 */ \
+ OP(Uniform1uivImmediate) /* 429 */ \
+ OP(Uniform2f) /* 430 */ \
+ OP(Uniform2fvImmediate) /* 431 */ \
+ OP(Uniform2i) /* 432 */ \
+ OP(Uniform2ivImmediate) /* 433 */ \
+ OP(Uniform2ui) /* 434 */ \
+ OP(Uniform2uivImmediate) /* 435 */ \
+ OP(Uniform3f) /* 436 */ \
+ OP(Uniform3fvImmediate) /* 437 */ \
+ OP(Uniform3i) /* 438 */ \
+ OP(Uniform3ivImmediate) /* 439 */ \
+ OP(Uniform3ui) /* 440 */ \
+ OP(Uniform3uivImmediate) /* 441 */ \
+ OP(Uniform4f) /* 442 */ \
+ OP(Uniform4fvImmediate) /* 443 */ \
+ OP(Uniform4i) /* 444 */ \
+ OP(Uniform4ivImmediate) /* 445 */ \
+ OP(Uniform4ui) /* 446 */ \
+ OP(Uniform4uivImmediate) /* 447 */ \
+ OP(UniformBlockBinding) /* 448 */ \
+ OP(UniformMatrix2fvImmediate) /* 449 */ \
+ OP(UniformMatrix2x3fvImmediate) /* 450 */ \
+ OP(UniformMatrix2x4fvImmediate) /* 451 */ \
+ OP(UniformMatrix3fvImmediate) /* 452 */ \
+ OP(UniformMatrix3x2fvImmediate) /* 453 */ \
+ OP(UniformMatrix3x4fvImmediate) /* 454 */ \
+ OP(UniformMatrix4fvImmediate) /* 455 */ \
+ OP(UniformMatrix4x2fvImmediate) /* 456 */ \
+ OP(UniformMatrix4x3fvImmediate) /* 457 */ \
+ OP(UseProgram) /* 458 */ \
+ OP(ValidateProgram) /* 459 */ \
+ OP(VertexAttrib1f) /* 460 */ \
+ OP(VertexAttrib1fvImmediate) /* 461 */ \
+ OP(VertexAttrib2f) /* 462 */ \
+ OP(VertexAttrib2fvImmediate) /* 463 */ \
+ OP(VertexAttrib3f) /* 464 */ \
+ OP(VertexAttrib3fvImmediate) /* 465 */ \
+ OP(VertexAttrib4f) /* 466 */ \
+ OP(VertexAttrib4fvImmediate) /* 467 */ \
+ OP(VertexAttribI4i) /* 468 */ \
+ OP(VertexAttribI4ivImmediate) /* 469 */ \
+ OP(VertexAttribI4ui) /* 470 */ \
+ OP(VertexAttribI4uivImmediate) /* 471 */ \
+ OP(VertexAttribIPointer) /* 472 */ \
+ OP(VertexAttribPointer) /* 473 */ \
+ OP(Viewport) /* 474 */ \
+ OP(WaitSync) /* 475 */ \
+ OP(BlitFramebufferCHROMIUM) /* 476 */ \
+ OP(RenderbufferStorageMultisampleCHROMIUM) /* 477 */ \
+ OP(RenderbufferStorageMultisampleEXT) /* 478 */ \
+ OP(FramebufferTexture2DMultisampleEXT) /* 479 */ \
+ OP(TexStorage2DEXT) /* 480 */ \
+ OP(GenQueriesEXTImmediate) /* 481 */ \
+ OP(DeleteQueriesEXTImmediate) /* 482 */ \
+ OP(BeginQueryEXT) /* 483 */ \
+ OP(BeginTransformFeedback) /* 484 */ \
+ OP(EndQueryEXT) /* 485 */ \
+ OP(EndTransformFeedback) /* 486 */ \
+ OP(InsertEventMarkerEXT) /* 487 */ \
+ OP(PushGroupMarkerEXT) /* 488 */ \
+ OP(PopGroupMarkerEXT) /* 489 */ \
+ OP(GenVertexArraysOESImmediate) /* 490 */ \
+ OP(DeleteVertexArraysOESImmediate) /* 491 */ \
+ OP(IsVertexArrayOES) /* 492 */ \
+ OP(BindVertexArrayOES) /* 493 */ \
+ OP(SwapBuffers) /* 494 */ \
+ OP(GetMaxValueInBufferCHROMIUM) /* 495 */ \
+ OP(EnableFeatureCHROMIUM) /* 496 */ \
+ OP(MapBufferRange) /* 497 */ \
+ OP(UnmapBuffer) /* 498 */ \
+ OP(ResizeCHROMIUM) /* 499 */ \
+ OP(GetRequestableExtensionsCHROMIUM) /* 500 */ \
+ OP(RequestExtensionCHROMIUM) /* 501 */ \
+ OP(GetProgramInfoCHROMIUM) /* 502 */ \
+ OP(GetUniformBlocksCHROMIUM) /* 503 */ \
+ OP(GetTransformFeedbackVaryingsCHROMIUM) /* 504 */ \
+ OP(GetUniformsES3CHROMIUM) /* 505 */ \
+ OP(GetTranslatedShaderSourceANGLE) /* 506 */ \
+ OP(PostSubBufferCHROMIUM) /* 507 */ \
+ OP(TexImageIOSurface2DCHROMIUM) /* 508 */ \
+ OP(CopyTextureCHROMIUM) /* 509 */ \
+ OP(CopySubTextureCHROMIUM) /* 510 */ \
+ OP(DrawArraysInstancedANGLE) /* 511 */ \
+ OP(DrawElementsInstancedANGLE) /* 512 */ \
+ OP(VertexAttribDivisorANGLE) /* 513 */ \
+ OP(GenMailboxCHROMIUM) /* 514 */ \
+ OP(ProduceTextureCHROMIUMImmediate) /* 515 */ \
+ OP(ProduceTextureDirectCHROMIUMImmediate) /* 516 */ \
+ OP(ConsumeTextureCHROMIUMImmediate) /* 517 */ \
+ OP(CreateAndConsumeTextureCHROMIUMImmediate) /* 518 */ \
+ OP(BindUniformLocationCHROMIUMBucket) /* 519 */ \
+ OP(GenValuebuffersCHROMIUMImmediate) /* 520 */ \
+ OP(DeleteValuebuffersCHROMIUMImmediate) /* 521 */ \
+ OP(IsValuebufferCHROMIUM) /* 522 */ \
+ OP(BindValuebufferCHROMIUM) /* 523 */ \
+ OP(SubscribeValueCHROMIUM) /* 524 */ \
+ OP(PopulateSubscribedValuesCHROMIUM) /* 525 */ \
+ OP(UniformValuebufferCHROMIUM) /* 526 */ \
+ OP(BindTexImage2DCHROMIUM) /* 527 */ \
+ OP(ReleaseTexImage2DCHROMIUM) /* 528 */ \
+ OP(TraceBeginCHROMIUM) /* 529 */ \
+ OP(TraceEndCHROMIUM) /* 530 */ \
+ OP(AsyncTexSubImage2DCHROMIUM) /* 531 */ \
+ OP(AsyncTexImage2DCHROMIUM) /* 532 */ \
+ OP(WaitAsyncTexImage2DCHROMIUM) /* 533 */ \
+ OP(WaitAllAsyncTexImage2DCHROMIUM) /* 534 */ \
+ OP(DiscardFramebufferEXTImmediate) /* 535 */ \
+ OP(LoseContextCHROMIUM) /* 536 */ \
+ OP(InsertSyncPointCHROMIUM) /* 537 */ \
+ OP(WaitSyncPointCHROMIUM) /* 538 */ \
+ OP(DrawBuffersEXTImmediate) /* 539 */ \
+ OP(DiscardBackbufferCHROMIUM) /* 540 */ \
+ OP(ScheduleOverlayPlaneCHROMIUM) /* 541 */ \
+ OP(SwapInterval) /* 542 */ \
+ OP(MatrixLoadfCHROMIUMImmediate) /* 543 */ \
+ OP(MatrixLoadIdentityCHROMIUM) /* 544 */ \
+ OP(BlendBarrierKHR) /* 545 */
enum CommandId {
kStartPoint = cmd::kLastCommonId, // All GLES2 commands start after this.
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 257758fe..d58156f 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -329,7 +329,7 @@ int GLES2Util::GLGetNumValuesReturned(int id) const {
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
return 1;
- // -- glGetVertexAttribfv, glGetVertexAttribiv
+ // -- glGetVertexAttrib
case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:
return 1;
case GL_VERTEX_ATTRIB_ARRAY_ENABLED:
@@ -344,6 +344,10 @@ int GLES2Util::GLGetNumValuesReturned(int id) const {
return 1;
case GL_CURRENT_VERTEX_ATTRIB:
return 4;
+ case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
+ return 1;
+ case GL_VERTEX_ATTRIB_ARRAY_DIVISOR:
+ return 1;
// -- glGetSynciv
case GL_OBJECT_TYPE: