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/feature_info.h" | 5 #include "gpu/command_buffer/service/feature_info.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "gpu/command_buffer/service/gpu_service_test.h" | 10 #include "gpu/command_buffer/service/gpu_service_test.h" |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 EXPECT_TRUE(info_->feature_flags().chromium_color_buffer_float_rgb); | 662 EXPECT_TRUE(info_->feature_flags().chromium_color_buffer_float_rgb); |
663 std::string extensions = info_->extensions() + " "; | 663 std::string extensions = info_->extensions() + " "; |
664 EXPECT_THAT(extensions, HasSubstr("GL_CHROMIUM_color_buffer_float_rgb ")); | 664 EXPECT_THAT(extensions, HasSubstr("GL_CHROMIUM_color_buffer_float_rgb ")); |
665 EXPECT_THAT(extensions, HasSubstr("GL_CHROMIUM_color_buffer_float_rgba")); | 665 EXPECT_THAT(extensions, HasSubstr("GL_CHROMIUM_color_buffer_float_rgba")); |
666 EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid( | 666 EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid( |
667 GL_RGBA32F)); | 667 GL_RGBA32F)); |
668 EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid( | 668 EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid( |
669 GL_RGB32F)); | 669 GL_RGB32F)); |
670 } | 670 } |
671 | 671 |
| 672 TEST_F(FeatureInfoTest, Initialize_texture_floatGLES3) { |
| 673 SetupInitExpectationsWithGLVersion("", "", "OpenGL ES 3.0"); |
| 674 EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_float"))); |
| 675 EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_half_float"))); |
| 676 EXPECT_THAT(info_->extensions(), |
| 677 Not(HasSubstr("GL_OES_texture_float_linear"))); |
| 678 EXPECT_THAT(info_->extensions(), |
| 679 Not(HasSubstr("GL_OES_texture_half_float_linear"))); |
| 680 EXPECT_FALSE(info_->GetTextureFormatValidator(GL_RGB).IsValid( |
| 681 GL_FLOAT)); |
| 682 EXPECT_FALSE(info_->GetTextureFormatValidator(GL_RGBA).IsValid( |
| 683 GL_FLOAT)); |
| 684 EXPECT_FALSE(info_->GetTextureFormatValidator(GL_LUMINANCE).IsValid( |
| 685 GL_FLOAT)); |
| 686 EXPECT_FALSE(info_->GetTextureFormatValidator(GL_LUMINANCE_ALPHA).IsValid( |
| 687 GL_FLOAT)); |
| 688 EXPECT_FALSE(info_->GetTextureFormatValidator(GL_ALPHA).IsValid( |
| 689 GL_FLOAT)); |
| 690 } |
| 691 |
672 TEST_F(FeatureInfoTest, InitializeOES_texture_floatGLES2) { | 692 TEST_F(FeatureInfoTest, InitializeOES_texture_floatGLES2) { |
673 SetupInitExpectations("GL_OES_texture_float"); | 693 SetupInitExpectations("GL_OES_texture_float"); |
674 EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); | 694 EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); |
675 EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); | 695 EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); |
676 EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_float")); | 696 EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_float")); |
677 EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_half_float"))); | 697 EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_half_float"))); |
678 EXPECT_THAT(info_->extensions(), | 698 EXPECT_THAT(info_->extensions(), |
679 Not(HasSubstr("GL_OES_texture_float_linear"))); | 699 Not(HasSubstr("GL_OES_texture_float_linear"))); |
680 EXPECT_THAT(info_->extensions(), | 700 EXPECT_THAT(info_->extensions(), |
681 Not(HasSubstr("GL_OES_texture_half_float_linear"))); | 701 Not(HasSubstr("GL_OES_texture_half_float_linear"))); |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 TEST_F(FeatureInfoTest, InitializeKHR_blend_equations_advanced_coherent) { | 1396 TEST_F(FeatureInfoTest, InitializeKHR_blend_equations_advanced_coherent) { |
1377 SetupInitExpectations("GL_KHR_blend_equation_advanced_coherent"); | 1397 SetupInitExpectations("GL_KHR_blend_equation_advanced_coherent"); |
1378 EXPECT_THAT(info_->extensions(), | 1398 EXPECT_THAT(info_->extensions(), |
1379 HasSubstr("GL_KHR_blend_equation_advanced_coherent")); | 1399 HasSubstr("GL_KHR_blend_equation_advanced_coherent")); |
1380 EXPECT_TRUE(info_->feature_flags().blend_equation_advanced); | 1400 EXPECT_TRUE(info_->feature_flags().blend_equation_advanced); |
1381 EXPECT_TRUE(info_->feature_flags().blend_equation_advanced_coherent); | 1401 EXPECT_TRUE(info_->feature_flags().blend_equation_advanced_coherent); |
1382 } | 1402 } |
1383 | 1403 |
1384 } // namespace gles2 | 1404 } // namespace gles2 |
1385 } // namespace gpu | 1405 } // namespace gpu |
OLD | NEW |