| Index: gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
|
| 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 e11bc479c390d5afbd75de2975367f8ad038214d..a920c50b6e08d75505f855b620e1451efd01ff4f 100644
|
| --- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
|
| +++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
|
| @@ -684,6 +684,41 @@ TEST_F(GLES2FormatTest, DeleteFramebuffersImmediate) {
|
| // TODO(gman): Check that ids were inserted;
|
| }
|
|
|
| +TEST_F(GLES2FormatTest, DeleteImageBuffers) {
|
| + cmds::DeleteImageBuffers& cmd = *GetBufferAs<cmds::DeleteImageBuffers>();
|
| + void* next_cmd = cmd.Set(
|
| + &cmd,
|
| + static_cast<GLsizei>(11),
|
| + static_cast<uint32>(12),
|
| + static_cast<uint32>(13));
|
| + EXPECT_EQ(static_cast<uint32>(cmds::DeleteImageBuffers::kCmdId),
|
| + cmd.header.command);
|
| + EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
|
| + EXPECT_EQ(static_cast<GLsizei>(11), cmd.n);
|
| + EXPECT_EQ(static_cast<uint32>(12), cmd.imagebuffers_shm_id);
|
| + EXPECT_EQ(static_cast<uint32>(13), cmd.imagebuffers_shm_offset);
|
| + CheckBytesWrittenMatchesExpectedSize(
|
| + next_cmd, sizeof(cmd));
|
| +}
|
| +
|
| +TEST_F(GLES2FormatTest, DeleteImageBuffersImmediate) {
|
| + static GLuint ids[] = { 12, 23, 34, };
|
| + cmds::DeleteImageBuffersImmediate& cmd =
|
| + *GetBufferAs<cmds::DeleteImageBuffersImmediate>();
|
| + void* next_cmd = cmd.Set(
|
| + &cmd, static_cast<GLsizei>(arraysize(ids)), ids);
|
| + EXPECT_EQ(static_cast<uint32>(cmds::DeleteImageBuffersImmediate::kCmdId),
|
| + cmd.header.command);
|
| + EXPECT_EQ(sizeof(cmd) +
|
| + RoundSizeToMultipleOfEntries(cmd.n * 4u),
|
| + cmd.header.size * 4u);
|
| + EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n);
|
| + CheckBytesWrittenMatchesExpectedSize(
|
| + next_cmd, sizeof(cmd) +
|
| + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u));
|
| + // TODO(gman): Check that ids were inserted;
|
| +}
|
| +
|
| TEST_F(GLES2FormatTest, DeleteProgram) {
|
| cmds::DeleteProgram& cmd = *GetBufferAs<cmds::DeleteProgram>();
|
| void* next_cmd = cmd.Set(
|
| @@ -1084,6 +1119,41 @@ TEST_F(GLES2FormatTest, GenFramebuffersImmediate) {
|
| // TODO(gman): Check that ids were inserted;
|
| }
|
|
|
| +TEST_F(GLES2FormatTest, GenImageBuffers) {
|
| + cmds::GenImageBuffers& cmd = *GetBufferAs<cmds::GenImageBuffers>();
|
| + void* next_cmd = cmd.Set(
|
| + &cmd,
|
| + static_cast<GLsizei>(11),
|
| + static_cast<uint32>(12),
|
| + static_cast<uint32>(13));
|
| + EXPECT_EQ(static_cast<uint32>(cmds::GenImageBuffers::kCmdId),
|
| + cmd.header.command);
|
| + EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
|
| + EXPECT_EQ(static_cast<GLsizei>(11), cmd.n);
|
| + EXPECT_EQ(static_cast<uint32>(12), cmd.imagebuffers_shm_id);
|
| + EXPECT_EQ(static_cast<uint32>(13), cmd.imagebuffers_shm_offset);
|
| + CheckBytesWrittenMatchesExpectedSize(
|
| + next_cmd, sizeof(cmd));
|
| +}
|
| +
|
| +TEST_F(GLES2FormatTest, GenImageBuffersImmediate) {
|
| + static GLuint ids[] = { 12, 23, 34, };
|
| + cmds::GenImageBuffersImmediate& cmd =
|
| + *GetBufferAs<cmds::GenImageBuffersImmediate>();
|
| + void* next_cmd = cmd.Set(
|
| + &cmd, static_cast<GLsizei>(arraysize(ids)), ids);
|
| + EXPECT_EQ(static_cast<uint32>(cmds::GenImageBuffersImmediate::kCmdId),
|
| + cmd.header.command);
|
| + EXPECT_EQ(sizeof(cmd) +
|
| + RoundSizeToMultipleOfEntries(cmd.n * 4u),
|
| + cmd.header.size * 4u);
|
| + EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n);
|
| + CheckBytesWrittenMatchesExpectedSize(
|
| + next_cmd, sizeof(cmd) +
|
| + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u));
|
| + // TODO(gman): Check that ids were inserted;
|
| +}
|
| +
|
| TEST_F(GLES2FormatTest, GenRenderbuffers) {
|
| cmds::GenRenderbuffers& cmd = *GetBufferAs<cmds::GenRenderbuffers>();
|
| void* next_cmd = cmd.Set(
|
|
|