| 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 3765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3776 cmd.header.command); | 3776 cmd.header.command); |
| 3777 EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), | 3777 EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), |
| 3778 cmd.header.size * 4u); | 3778 cmd.header.size * 4u); |
| 3779 EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); | 3779 EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); |
| 3780 CheckBytesWrittenMatchesExpectedSize( | 3780 CheckBytesWrittenMatchesExpectedSize( |
| 3781 next_cmd, | 3781 next_cmd, |
| 3782 sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); | 3782 sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); |
| 3783 // TODO(gman): Check that ids were inserted; | 3783 // TODO(gman): Check that ids were inserted; |
| 3784 } | 3784 } |
| 3785 | 3785 |
| 3786 TEST_F(GLES2FormatTest, QueryCounterEXT) { |
| 3787 cmds::QueryCounterEXT& cmd = *GetBufferAs<cmds::QueryCounterEXT>(); |
| 3788 void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11), |
| 3789 static_cast<GLenum>(12), static_cast<uint32_t>(13), |
| 3790 static_cast<uint32_t>(14), static_cast<GLuint>(15)); |
| 3791 EXPECT_EQ(static_cast<uint32_t>(cmds::QueryCounterEXT::kCmdId), |
| 3792 cmd.header.command); |
| 3793 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3794 EXPECT_EQ(static_cast<GLuint>(11), cmd.id); |
| 3795 EXPECT_EQ(static_cast<GLenum>(12), cmd.target); |
| 3796 EXPECT_EQ(static_cast<uint32_t>(13), cmd.sync_data_shm_id); |
| 3797 EXPECT_EQ(static_cast<uint32_t>(14), cmd.sync_data_shm_offset); |
| 3798 EXPECT_EQ(static_cast<GLuint>(15), cmd.submit_count); |
| 3799 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
| 3800 } |
| 3801 |
| 3786 TEST_F(GLES2FormatTest, BeginQueryEXT) { | 3802 TEST_F(GLES2FormatTest, BeginQueryEXT) { |
| 3787 cmds::BeginQueryEXT& cmd = *GetBufferAs<cmds::BeginQueryEXT>(); | 3803 cmds::BeginQueryEXT& cmd = *GetBufferAs<cmds::BeginQueryEXT>(); |
| 3788 void* next_cmd = | 3804 void* next_cmd = |
| 3789 cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12), | 3805 cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12), |
| 3790 static_cast<uint32_t>(13), static_cast<uint32_t>(14)); | 3806 static_cast<uint32_t>(13), static_cast<uint32_t>(14)); |
| 3791 EXPECT_EQ(static_cast<uint32_t>(cmds::BeginQueryEXT::kCmdId), | 3807 EXPECT_EQ(static_cast<uint32_t>(cmds::BeginQueryEXT::kCmdId), |
| 3792 cmd.header.command); | 3808 cmd.header.command); |
| 3793 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 3809 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 3794 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | 3810 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 3795 EXPECT_EQ(static_cast<GLuint>(12), cmd.id); | 3811 EXPECT_EQ(static_cast<GLuint>(12), cmd.id); |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5089 TEST_F(GLES2FormatTest, BlendBarrierKHR) { | 5105 TEST_F(GLES2FormatTest, BlendBarrierKHR) { |
| 5090 cmds::BlendBarrierKHR& cmd = *GetBufferAs<cmds::BlendBarrierKHR>(); | 5106 cmds::BlendBarrierKHR& cmd = *GetBufferAs<cmds::BlendBarrierKHR>(); |
| 5091 void* next_cmd = cmd.Set(&cmd); | 5107 void* next_cmd = cmd.Set(&cmd); |
| 5092 EXPECT_EQ(static_cast<uint32_t>(cmds::BlendBarrierKHR::kCmdId), | 5108 EXPECT_EQ(static_cast<uint32_t>(cmds::BlendBarrierKHR::kCmdId), |
| 5093 cmd.header.command); | 5109 cmd.header.command); |
| 5094 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 5110 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 5095 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); | 5111 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
| 5096 } | 5112 } |
| 5097 | 5113 |
| 5098 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 5114 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
| OLD | NEW |