OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // DO NOT EDIT! | 7 // DO NOT EDIT! |
8 | 8 |
9 // This file contains unit tests for gles2 commmands | 9 // This file contains unit tests for gles2 commmands |
10 // It is included by gles2_cmd_format_test.cc | 10 // It is included by gles2_cmd_format_test.cc |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 &cmd, | 1796 &cmd, |
1797 static_cast<GLint>(11), | 1797 static_cast<GLint>(11), |
1798 static_cast<GLint>(12), | 1798 static_cast<GLint>(12), |
1799 static_cast<GLsizei>(13), | 1799 static_cast<GLsizei>(13), |
1800 static_cast<GLsizei>(14), | 1800 static_cast<GLsizei>(14), |
1801 static_cast<GLenum>(15), | 1801 static_cast<GLenum>(15), |
1802 static_cast<GLenum>(16), | 1802 static_cast<GLenum>(16), |
1803 static_cast<uint32>(17), | 1803 static_cast<uint32>(17), |
1804 static_cast<uint32>(18), | 1804 static_cast<uint32>(18), |
1805 static_cast<uint32>(19), | 1805 static_cast<uint32>(19), |
1806 static_cast<uint32>(20)); | 1806 static_cast<uint32>(20), |
| 1807 static_cast<GLboolean>(21)); |
1807 EXPECT_EQ(static_cast<uint32>(cmds::ReadPixels::kCmdId), | 1808 EXPECT_EQ(static_cast<uint32>(cmds::ReadPixels::kCmdId), |
1808 cmd.header.command); | 1809 cmd.header.command); |
1809 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 1810 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
1810 EXPECT_EQ(static_cast<GLint>(11), cmd.x); | 1811 EXPECT_EQ(static_cast<GLint>(11), cmd.x); |
1811 EXPECT_EQ(static_cast<GLint>(12), cmd.y); | 1812 EXPECT_EQ(static_cast<GLint>(12), cmd.y); |
1812 EXPECT_EQ(static_cast<GLsizei>(13), cmd.width); | 1813 EXPECT_EQ(static_cast<GLsizei>(13), cmd.width); |
1813 EXPECT_EQ(static_cast<GLsizei>(14), cmd.height); | 1814 EXPECT_EQ(static_cast<GLsizei>(14), cmd.height); |
1814 EXPECT_EQ(static_cast<GLenum>(15), cmd.format); | 1815 EXPECT_EQ(static_cast<GLenum>(15), cmd.format); |
1815 EXPECT_EQ(static_cast<GLenum>(16), cmd.type); | 1816 EXPECT_EQ(static_cast<GLenum>(16), cmd.type); |
1816 EXPECT_EQ(static_cast<uint32>(17), cmd.pixels_shm_id); | 1817 EXPECT_EQ(static_cast<uint32>(17), cmd.pixels_shm_id); |
1817 EXPECT_EQ(static_cast<uint32>(18), cmd.pixels_shm_offset); | 1818 EXPECT_EQ(static_cast<uint32>(18), cmd.pixels_shm_offset); |
1818 EXPECT_EQ(static_cast<uint32>(19), cmd.result_shm_id); | 1819 EXPECT_EQ(static_cast<uint32>(19), cmd.result_shm_id); |
1819 EXPECT_EQ(static_cast<uint32>(20), cmd.result_shm_offset); | 1820 EXPECT_EQ(static_cast<uint32>(20), cmd.result_shm_offset); |
| 1821 EXPECT_EQ(static_cast<GLboolean>(21), cmd.async); |
1820 CheckBytesWrittenMatchesExpectedSize( | 1822 CheckBytesWrittenMatchesExpectedSize( |
1821 next_cmd, sizeof(cmd)); | 1823 next_cmd, sizeof(cmd)); |
1822 } | 1824 } |
1823 | 1825 |
1824 TEST_F(GLES2FormatTest, ReleaseShaderCompiler) { | 1826 TEST_F(GLES2FormatTest, ReleaseShaderCompiler) { |
1825 cmds::ReleaseShaderCompiler& cmd = | 1827 cmds::ReleaseShaderCompiler& cmd = |
1826 *GetBufferAs<cmds::ReleaseShaderCompiler>(); | 1828 *GetBufferAs<cmds::ReleaseShaderCompiler>(); |
1827 void* next_cmd = cmd.Set( | 1829 void* next_cmd = cmd.Set( |
1828 &cmd); | 1830 &cmd); |
1829 EXPECT_EQ(static_cast<uint32>(cmds::ReleaseShaderCompiler::kCmdId), | 1831 EXPECT_EQ(static_cast<uint32>(cmds::ReleaseShaderCompiler::kCmdId), |
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4497 EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); | 4499 EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); |
4498 EXPECT_EQ(static_cast<GLsizei>(1), cmd.count); | 4500 EXPECT_EQ(static_cast<GLsizei>(1), cmd.count); |
4499 CheckBytesWrittenMatchesExpectedSize( | 4501 CheckBytesWrittenMatchesExpectedSize( |
4500 next_cmd, sizeof(cmd) + | 4502 next_cmd, sizeof(cmd) + |
4501 RoundSizeToMultipleOfEntries(sizeof(data))); | 4503 RoundSizeToMultipleOfEntries(sizeof(data))); |
4502 // TODO(gman): Check that data was inserted; | 4504 // TODO(gman): Check that data was inserted; |
4503 } | 4505 } |
4504 | 4506 |
4505 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 4507 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
4506 | 4508 |
OLD | NEW |