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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 GLuint temp[4 * 2] = { | 1283 GLuint temp[4 * 2] = { |
1284 0, | 1284 0, |
1285 }; | 1285 }; |
1286 cmd.Init(1, 2, &temp[0]); | 1286 cmd.Init(1, 2, &temp[0]); |
1287 decoder_->set_unsafe_es3_apis_enabled(true); | 1287 decoder_->set_unsafe_es3_apis_enabled(true); |
1288 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); | 1288 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); |
1289 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 1289 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
1290 decoder_->set_unsafe_es3_apis_enabled(false); | 1290 decoder_->set_unsafe_es3_apis_enabled(false); |
1291 EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp))); | 1291 EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp))); |
1292 } | 1292 } |
| 1293 // TODO(gman): UniformBlockBinding |
1293 | 1294 |
1294 TEST_P(GLES2DecoderTest2, UniformMatrix2fvImmediateValidArgs) { | 1295 TEST_P(GLES2DecoderTest2, UniformMatrix2fvImmediateValidArgs) { |
1295 cmds::UniformMatrix2fvImmediate& cmd = | 1296 cmds::UniformMatrix2fvImmediate& cmd = |
1296 *GetImmediateAs<cmds::UniformMatrix2fvImmediate>(); | 1297 *GetImmediateAs<cmds::UniformMatrix2fvImmediate>(); |
1297 EXPECT_CALL(*gl_, | 1298 EXPECT_CALL(*gl_, |
1298 UniformMatrix2fv(1, 2, false, reinterpret_cast<GLfloat*>( | 1299 UniformMatrix2fv(1, 2, false, reinterpret_cast<GLfloat*>( |
1299 ImmediateDataAddress(&cmd)))); | 1300 ImmediateDataAddress(&cmd)))); |
1300 SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(true); | 1301 SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(true); |
1301 GLfloat temp[4 * 2] = { | 1302 GLfloat temp[4 * 2] = { |
1302 0, | 1303 0, |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 } | 1542 } |
1542 | 1543 |
1543 TEST_P(GLES2DecoderTest2, VertexAttrib4fValidArgs) { | 1544 TEST_P(GLES2DecoderTest2, VertexAttrib4fValidArgs) { |
1544 EXPECT_CALL(*gl_, VertexAttrib4f(1, 2, 3, 4, 5)); | 1545 EXPECT_CALL(*gl_, VertexAttrib4f(1, 2, 3, 4, 5)); |
1545 SpecializedSetup<cmds::VertexAttrib4f, 0>(true); | 1546 SpecializedSetup<cmds::VertexAttrib4f, 0>(true); |
1546 cmds::VertexAttrib4f cmd; | 1547 cmds::VertexAttrib4f cmd; |
1547 cmd.Init(1, 2, 3, 4, 5); | 1548 cmd.Init(1, 2, 3, 4, 5); |
1548 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1549 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
1549 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 1550 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
1550 } | 1551 } |
1551 | |
1552 TEST_P(GLES2DecoderTest2, VertexAttrib4fvImmediateValidArgs) { | |
1553 cmds::VertexAttrib4fvImmediate& cmd = | |
1554 *GetImmediateAs<cmds::VertexAttrib4fvImmediate>(); | |
1555 SpecializedSetup<cmds::VertexAttrib4fvImmediate, 0>(true); | |
1556 GLfloat temp[4] = { | |
1557 0, | |
1558 }; | |
1559 cmd.Init(1, &temp[0]); | |
1560 EXPECT_CALL(*gl_, VertexAttrib4fv(1, reinterpret_cast<GLfloat*>( | |
1561 ImmediateDataAddress(&cmd)))); | |
1562 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); | |
1563 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | |
1564 } | |
1565 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ | 1552 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ |
OLD | NEW |