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 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 cmds_[1].header.size += 1; | 1526 cmds_[1].header.size += 1; |
1527 int num_processed = -1; | 1527 int num_processed = -1; |
1528 SetExpectationsForNCommands(1); | 1528 SetExpectationsForNCommands(1); |
1529 EXPECT_EQ(error::kInvalidArguments, | 1529 EXPECT_EQ(error::kInvalidArguments, |
1530 decoder_->DoCommands( | 1530 decoder_->DoCommands( |
1531 2, &cmds_, entries_per_cmd_ * 2 + 1, &num_processed)); | 1531 2, &cmds_, entries_per_cmd_ * 2 + 1, &num_processed)); |
1532 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 1532 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
1533 EXPECT_EQ(entries_per_cmd_ + cmds_[1].header.size, num_processed); | 1533 EXPECT_EQ(entries_per_cmd_ + cmds_[1].header.size, num_processed); |
1534 } | 1534 } |
1535 | 1535 |
| 1536 void GLES3DecoderWithESSL3ShaderTest::SetUp() { |
| 1537 base::CommandLine command_line(0, nullptr); |
| 1538 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); |
| 1539 InitState init; |
| 1540 init.gl_version = "OpenGL ES 3.0"; |
| 1541 init.bind_generates_resource = true; |
| 1542 init.context_type = CONTEXT_TYPE_OPENGLES3; |
| 1543 InitDecoderWithCommandLine(init, &command_line); |
| 1544 SetupDefaultProgram(); |
| 1545 } |
| 1546 |
1536 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest, ::testing::Bool()); | 1547 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest, ::testing::Bool()); |
1537 | 1548 |
1538 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderWithShaderTest, ::testing::Bool()); | 1549 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderWithShaderTest, ::testing::Bool()); |
1539 | 1550 |
1540 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderManualInitTest, ::testing::Bool()); | 1551 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderManualInitTest, ::testing::Bool()); |
1541 | 1552 |
1542 INSTANTIATE_TEST_CASE_P(Service, | 1553 INSTANTIATE_TEST_CASE_P(Service, |
1543 GLES2DecoderRGBBackbufferTest, | 1554 GLES2DecoderRGBBackbufferTest, |
1544 ::testing::Bool()); | 1555 ::testing::Bool()); |
1545 | 1556 |
1546 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); | 1557 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); |
1547 | 1558 |
1548 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); | 1559 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); |
1549 | 1560 |
| 1561 INSTANTIATE_TEST_CASE_P(Service, |
| 1562 GLES3DecoderWithESSL3ShaderTest, |
| 1563 ::testing::Bool()); |
| 1564 |
1550 } // namespace gles2 | 1565 } // namespace gles2 |
1551 } // namespace gpu | 1566 } // namespace gpu |
OLD | NEW |