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 |
11 // It is included by gles2_cmd_decoder_unittest_2.cc | 11 // It is included by gles2_cmd_decoder_unittest_2.cc |
12 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ | 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ |
13 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ | 13 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ |
14 | 14 |
15 // TODO(gman): GetString | 15 // TODO(gman): GetString |
16 | 16 |
| 17 TEST_P(GLES2DecoderTest2, GetSyncivValidArgs) { |
| 18 EXPECT_CALL(*gl_, GetError()) |
| 19 .WillOnce(Return(GL_NO_ERROR)) |
| 20 .WillOnce(Return(GL_NO_ERROR)) |
| 21 .RetiresOnSaturation(); |
| 22 SpecializedSetup<cmds::GetSynciv, 0>(true); |
| 23 typedef cmds::GetSynciv::Result Result; |
| 24 Result* result = static_cast<Result*>(shared_memory_address_); |
| 25 EXPECT_CALL( |
| 26 *gl_, GetSynciv(reinterpret_cast<GLsync>(kServiceSyncId), GL_SYNC_STATUS, |
| 27 decoder_->GetGLES2Util()->GLGetNumValuesReturned( |
| 28 GL_SYNC_STATUS), |
| 29 nullptr, result->GetData())); |
| 30 result->size = 0; |
| 31 cmds::GetSynciv cmd; |
| 32 cmd.Init(client_sync_id_, GL_SYNC_STATUS, shared_memory_id_, |
| 33 shared_memory_offset_); |
| 34 decoder_->set_unsafe_es3_apis_enabled(true); |
| 35 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 36 EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_SYNC_STATUS), |
| 37 result->GetNumResults()); |
| 38 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 39 decoder_->set_unsafe_es3_apis_enabled(false); |
| 40 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); |
| 41 } |
| 42 |
17 TEST_P(GLES2DecoderTest2, GetTexParameterfvValidArgs) { | 43 TEST_P(GLES2DecoderTest2, GetTexParameterfvValidArgs) { |
18 EXPECT_CALL(*gl_, GetError()) | 44 EXPECT_CALL(*gl_, GetError()) |
19 .WillOnce(Return(GL_NO_ERROR)) | 45 .WillOnce(Return(GL_NO_ERROR)) |
20 .WillOnce(Return(GL_NO_ERROR)) | 46 .WillOnce(Return(GL_NO_ERROR)) |
21 .RetiresOnSaturation(); | 47 .RetiresOnSaturation(); |
22 SpecializedSetup<cmds::GetTexParameterfv, 0>(true); | 48 SpecializedSetup<cmds::GetTexParameterfv, 0>(true); |
23 typedef cmds::GetTexParameterfv::Result Result; | 49 typedef cmds::GetTexParameterfv::Result Result; |
24 Result* result = static_cast<Result*>(shared_memory_address_); | 50 Result* result = static_cast<Result*>(shared_memory_address_); |
25 EXPECT_CALL(*gl_, GetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, | 51 EXPECT_CALL(*gl_, GetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, |
26 result->GetData())); | 52 result->GetData())); |
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 SpecializedSetup<cmds::VertexAttrib1fvImmediate, 0>(true); | 1593 SpecializedSetup<cmds::VertexAttrib1fvImmediate, 0>(true); |
1568 GLfloat temp[1] = { | 1594 GLfloat temp[1] = { |
1569 0, | 1595 0, |
1570 }; | 1596 }; |
1571 cmd.Init(1, &temp[0]); | 1597 cmd.Init(1, &temp[0]); |
1572 EXPECT_CALL(*gl_, VertexAttrib1fv(1, reinterpret_cast<GLfloat*>( | 1598 EXPECT_CALL(*gl_, VertexAttrib1fv(1, reinterpret_cast<GLfloat*>( |
1573 ImmediateDataAddress(&cmd)))); | 1599 ImmediateDataAddress(&cmd)))); |
1574 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); | 1600 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); |
1575 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 1601 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
1576 } | 1602 } |
1577 | |
1578 TEST_P(GLES2DecoderTest2, VertexAttrib2fValidArgs) { | |
1579 EXPECT_CALL(*gl_, VertexAttrib2f(1, 2, 3)); | |
1580 SpecializedSetup<cmds::VertexAttrib2f, 0>(true); | |
1581 cmds::VertexAttrib2f cmd; | |
1582 cmd.Init(1, 2, 3); | |
1583 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | |
1584 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | |
1585 } | |
1586 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ | 1603 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ |
OLD | NEW |