| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file is auto-generated from | 5 // This file is auto-generated from |
| 6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
| 7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
| 8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
| 9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
| 10 | 10 |
| (...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 cmd.header.command); | 1619 cmd.header.command); |
| 1620 EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), | 1620 EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), |
| 1621 cmd.header.size * 4u); | 1621 cmd.header.size * 4u); |
| 1622 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | 1622 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 1623 EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); | 1623 EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); |
| 1624 CheckBytesWrittenMatchesExpectedSize( | 1624 CheckBytesWrittenMatchesExpectedSize( |
| 1625 next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); | 1625 next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); |
| 1626 // TODO(gman): Check that data was inserted; | 1626 // TODO(gman): Check that data was inserted; |
| 1627 } | 1627 } |
| 1628 | 1628 |
| 1629 TEST_F(GLES2FormatTest, TexStorage3D) { |
| 1630 cmds::TexStorage3D& cmd = *GetBufferAs<cmds::TexStorage3D>(); |
| 1631 void* next_cmd = |
| 1632 cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLsizei>(12), |
| 1633 static_cast<GLenum>(13), static_cast<GLsizei>(14), |
| 1634 static_cast<GLsizei>(15), static_cast<GLsizei>(16)); |
| 1635 EXPECT_EQ(static_cast<uint32_t>(cmds::TexStorage3D::kCmdId), |
| 1636 cmd.header.command); |
| 1637 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 1638 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 1639 EXPECT_EQ(static_cast<GLsizei>(12), cmd.levels); |
| 1640 EXPECT_EQ(static_cast<GLenum>(13), cmd.internalFormat); |
| 1641 EXPECT_EQ(static_cast<GLsizei>(14), cmd.width); |
| 1642 EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); |
| 1643 EXPECT_EQ(static_cast<GLsizei>(16), cmd.depth); |
| 1644 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
| 1645 } |
| 1646 |
| 1629 TEST_F(GLES2FormatTest, TexSubImage2D) { | 1647 TEST_F(GLES2FormatTest, TexSubImage2D) { |
| 1630 cmds::TexSubImage2D& cmd = *GetBufferAs<cmds::TexSubImage2D>(); | 1648 cmds::TexSubImage2D& cmd = *GetBufferAs<cmds::TexSubImage2D>(); |
| 1631 void* next_cmd = cmd.Set( | 1649 void* next_cmd = cmd.Set( |
| 1632 &cmd, static_cast<GLenum>(11), static_cast<GLint>(12), | 1650 &cmd, static_cast<GLenum>(11), static_cast<GLint>(12), |
| 1633 static_cast<GLint>(13), static_cast<GLint>(14), static_cast<GLsizei>(15), | 1651 static_cast<GLint>(13), static_cast<GLint>(14), static_cast<GLsizei>(15), |
| 1634 static_cast<GLsizei>(16), static_cast<GLenum>(17), | 1652 static_cast<GLsizei>(16), static_cast<GLenum>(17), |
| 1635 static_cast<GLenum>(18), static_cast<uint32_t>(19), | 1653 static_cast<GLenum>(18), static_cast<uint32_t>(19), |
| 1636 static_cast<uint32_t>(20), static_cast<GLboolean>(21)); | 1654 static_cast<uint32_t>(20), static_cast<GLboolean>(21)); |
| 1637 EXPECT_EQ(static_cast<uint32_t>(cmds::TexSubImage2D::kCmdId), | 1655 EXPECT_EQ(static_cast<uint32_t>(cmds::TexSubImage2D::kCmdId), |
| 1638 cmd.header.command); | 1656 cmd.header.command); |
| (...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3826 TEST_F(GLES2FormatTest, BlendBarrierKHR) { | 3844 TEST_F(GLES2FormatTest, BlendBarrierKHR) { |
| 3827 cmds::BlendBarrierKHR& cmd = *GetBufferAs<cmds::BlendBarrierKHR>(); | 3845 cmds::BlendBarrierKHR& cmd = *GetBufferAs<cmds::BlendBarrierKHR>(); |
| 3828 void* next_cmd = cmd.Set(&cmd); | 3846 void* next_cmd = cmd.Set(&cmd); |
| 3829 EXPECT_EQ(static_cast<uint32_t>(cmds::BlendBarrierKHR::kCmdId), | 3847 EXPECT_EQ(static_cast<uint32_t>(cmds::BlendBarrierKHR::kCmdId), |
| 3830 cmd.header.command); | 3848 cmd.header.command); |
| 3831 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3849 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3832 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); | 3850 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
| 3833 } | 3851 } |
| 3834 | 3852 |
| 3835 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 3853 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
| OLD | NEW |