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 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2300 for (int ii = 0; ii < 2; ++ii) { | 2300 for (int ii = 0; ii < 2; ++ii) { |
2301 for (int jj = 0; jj < 12; ++jj) { | 2301 for (int jj = 0; jj < 12; ++jj) { |
2302 data[ii][jj] = static_cast<GLfloat>(ii * 12 + jj); | 2302 data[ii][jj] = static_cast<GLfloat>(ii * 12 + jj); |
2303 } | 2303 } |
2304 } | 2304 } |
2305 expected.cmd.Init(1, 2, true, &data[0][0]); | 2305 expected.cmd.Init(1, 2, true, &data[0][0]); |
2306 gl_->UniformMatrix4x3fv(1, 2, true, &data[0][0]); | 2306 gl_->UniformMatrix4x3fv(1, 2, true, &data[0][0]); |
2307 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2307 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
2308 } | 2308 } |
2309 | 2309 |
| 2310 TEST_F(GLES2ImplementationTest, UniformMatrix4fvWithCustomMatrixCHROMIUM) { |
| 2311 GLfloat data[2][16] = {{0}}; |
| 2312 struct Cmds { |
| 2313 cmds::UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate cmd; |
| 2314 GLfloat data[2][16]; |
| 2315 }; |
| 2316 |
| 2317 Cmds expected; |
| 2318 for (int ii = 0; ii < 2; ++ii) { |
| 2319 for (int jj = 0; jj < 16; ++jj) { |
| 2320 data[ii][jj] = static_cast<GLfloat>(ii * 16 + jj); |
| 2321 } |
| 2322 } |
| 2323 expected.cmd.Init(1, 2, 3, true, &data[0][0]); |
| 2324 gl_->UniformMatrix4fvWithCustomMatrixCHROMIUM(1, 2, 3, true, &data[0][0]); |
| 2325 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 2326 } |
| 2327 |
2310 TEST_F(GLES2ImplementationTest, UseProgram) { | 2328 TEST_F(GLES2ImplementationTest, UseProgram) { |
2311 struct Cmds { | 2329 struct Cmds { |
2312 cmds::UseProgram cmd; | 2330 cmds::UseProgram cmd; |
2313 }; | 2331 }; |
2314 Cmds expected; | 2332 Cmds expected; |
2315 expected.cmd.Init(1); | 2333 expected.cmd.Init(1); |
2316 | 2334 |
2317 gl_->UseProgram(1); | 2335 gl_->UseProgram(1); |
2318 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2336 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
2319 ClearCommands(); | 2337 ClearCommands(); |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3111 struct Cmds { | 3129 struct Cmds { |
3112 cmds::CoverageModulationCHROMIUM cmd; | 3130 cmds::CoverageModulationCHROMIUM cmd; |
3113 }; | 3131 }; |
3114 Cmds expected; | 3132 Cmds expected; |
3115 expected.cmd.Init(GL_RGB); | 3133 expected.cmd.Init(GL_RGB); |
3116 | 3134 |
3117 gl_->CoverageModulationCHROMIUM(GL_RGB); | 3135 gl_->CoverageModulationCHROMIUM(GL_RGB); |
3118 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3136 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3119 } | 3137 } |
3120 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 3138 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
OLD | NEW |