Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc

Issue 1309743005: command_buffer: Implement EXT_blend_func_extended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Patch Set: ~ Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void GLES3DecoderTest::SetUp() { 90 void GLES3DecoderTest::SetUp() {
91 base::CommandLine command_line(0, NULL); 91 base::CommandLine command_line(0, NULL);
92 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); 92 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
93 InitState init; 93 InitState init;
94 init.gl_version = "OpenGL ES 3.0"; 94 init.gl_version = "OpenGL ES 3.0";
95 init.bind_generates_resource = true; 95 init.bind_generates_resource = true;
96 init.context_type = ContextCreationAttribHelper::CONTEXT_TYPE_OPENGLES3; 96 init.context_type = ContextCreationAttribHelper::CONTEXT_TYPE_OPENGLES3;
97 InitDecoderWithCommandLine(init, &command_line); 97 InitDecoderWithCommandLine(init, &command_line);
98 } 98 }
99 99
100
101 TEST_P(GLES3DecoderTest, Basic) { 100 TEST_P(GLES3DecoderTest, Basic) {
102 // Make sure the setup is correct for ES3. 101 // Make sure the setup is correct for ES3.
103 EXPECT_TRUE(decoder_->unsafe_es3_apis_enabled()); 102 EXPECT_TRUE(decoder_->unsafe_es3_apis_enabled());
104 EXPECT_TRUE(feature_info()->validators()->texture_bind_target.IsValid( 103 EXPECT_TRUE(feature_info()->validators()->texture_bind_target.IsValid(
105 GL_TEXTURE_3D)); 104 GL_TEXTURE_3D));
106 } 105 }
107 106
108 TEST_P(GLES2DecoderTest, GetIntegervCached) { 107 TEST_P(GLES2DecoderTest, GetIntegervCached) {
109 struct TestInfo { 108 struct TestInfo {
110 GLenum pname; 109 GLenum pname;
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 cmds_[1].header.size += 1; 1561 cmds_[1].header.size += 1;
1563 int num_processed = -1; 1562 int num_processed = -1;
1564 SetExpectationsForNCommands(1); 1563 SetExpectationsForNCommands(1);
1565 EXPECT_EQ(error::kInvalidArguments, 1564 EXPECT_EQ(error::kInvalidArguments,
1566 decoder_->DoCommands( 1565 decoder_->DoCommands(
1567 2, &cmds_, entries_per_cmd_ * 2 + 1, &num_processed)); 1566 2, &cmds_, entries_per_cmd_ * 2 + 1, &num_processed));
1568 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 1567 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1569 EXPECT_EQ(entries_per_cmd_ + cmds_[1].header.size, num_processed); 1568 EXPECT_EQ(entries_per_cmd_ + cmds_[1].header.size, num_processed);
1570 } 1569 }
1571 1570
1571 void GLES3DecoderWithESSL3ShaderTest::SetUp() {
1572 base::CommandLine command_line(0, NULL);
1573 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
1574 InitState init;
1575 init.gl_version = "OpenGL ES 3.0";
1576 init.bind_generates_resource = true;
1577 init.context_type = ContextCreationAttribHelper::CONTEXT_TYPE_OPENGLES3;
1578 InitDecoderWithCommandLine(init, &command_line);
1579 SetupDefaultProgram();
1580 }
1581
1572 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest, ::testing::Bool()); 1582 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest, ::testing::Bool());
1573 1583
1574 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderWithShaderTest, ::testing::Bool()); 1584 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderWithShaderTest, ::testing::Bool());
1575 1585
1576 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderManualInitTest, ::testing::Bool()); 1586 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderManualInitTest, ::testing::Bool());
1577 1587
1578 INSTANTIATE_TEST_CASE_P(Service, 1588 INSTANTIATE_TEST_CASE_P(Service,
1579 GLES2DecoderRGBBackbufferTest, 1589 GLES2DecoderRGBBackbufferTest,
1580 ::testing::Bool()); 1590 ::testing::Bool());
1581 1591
1582 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); 1592 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool());
1583 1593
1584 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); 1594 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool());
1585 1595
1596 INSTANTIATE_TEST_CASE_P(Service,
1597 GLES3DecoderWithESSL3ShaderTest,
1598 ::testing::Bool());
1599
1586 } // namespace gles2 1600 } // namespace gles2
1587 } // namespace gpu 1601 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698