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

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

Issue 489023002: gpu: Enable relevant extentions on GLES3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest failure; exclude EXT_draw_buffers Created 6 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/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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 } 982 }
983 983
984 TEST_F(FeatureInfoTest, InitializeSamplersWithARBSamplerObjects) { 984 TEST_F(FeatureInfoTest, InitializeSamplersWithARBSamplerObjects) {
985 SetupInitExpectationsWithGLVersion( 985 SetupInitExpectationsWithGLVersion(
986 "GL_ARB_sampler_objects", "", "OpenGL 3.0"); 986 "GL_ARB_sampler_objects", "", "OpenGL 3.0");
987 EXPECT_TRUE(info_->feature_flags().enable_samplers); 987 EXPECT_TRUE(info_->feature_flags().enable_samplers);
988 } 988 }
989 989
990 TEST_F(FeatureInfoTest, InitializeWithES3) { 990 TEST_F(FeatureInfoTest, InitializeWithES3) {
991 SetupInitExpectationsWithGLVersion("", "", "OpenGL ES 3.0"); 991 SetupInitExpectationsWithGLVersion("", "", "OpenGL ES 3.0");
992 EXPECT_TRUE(info_->feature_flags().enable_samplers);
993 EXPECT_TRUE(info_->feature_flags().map_buffer_range);
994 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer);
995 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer"));
996 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); 992 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample);
997 EXPECT_TRUE(info_->feature_flags().use_core_framebuffer_multisample); 993 EXPECT_TRUE(info_->feature_flags().use_core_framebuffer_multisample);
998 EXPECT_THAT(info_->extensions(), 994 EXPECT_THAT(info_->extensions(),
999 HasSubstr("GL_CHROMIUM_framebuffer_multisample")); 995 HasSubstr("GL_CHROMIUM_framebuffer_multisample"));
1000 EXPECT_TRUE(info_->feature_flags().use_async_readpixels); 996 EXPECT_TRUE(info_->feature_flags().use_async_readpixels);
997 EXPECT_TRUE(info_->feature_flags().oes_standard_derivatives);
1001 EXPECT_TRUE(info_->feature_flags().oes_depth24); 998 EXPECT_TRUE(info_->feature_flags().oes_depth24);
1002 EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture")); 999 EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture"));
1003 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_depth_texture")); 1000 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_depth_texture"));
1001 EXPECT_TRUE(
1002 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_COMPONENT));
1003 EXPECT_TRUE(
1004 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL));
1005 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_COMPONENT));
1006 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL));
1007 EXPECT_TRUE(info_->validators()->pixel_type.IsValid(GL_UNSIGNED_SHORT));
1008 EXPECT_TRUE(info_->validators()->pixel_type.IsValid(GL_UNSIGNED_INT));
1004 EXPECT_TRUE(info_->validators()->pixel_type.IsValid(GL_UNSIGNED_INT_24_8)); 1009 EXPECT_TRUE(info_->validators()->pixel_type.IsValid(GL_UNSIGNED_INT_24_8));
1005 EXPECT_TRUE(info_->GetTextureFormatValidator(GL_DEPTH_COMPONENT) 1010 EXPECT_TRUE(info_->GetTextureFormatValidator(GL_DEPTH_COMPONENT)
1006 .IsValid(GL_UNSIGNED_SHORT)); 1011 .IsValid(GL_UNSIGNED_SHORT));
1007 EXPECT_TRUE(info_->GetTextureFormatValidator(GL_DEPTH_COMPONENT) 1012 EXPECT_TRUE(info_->GetTextureFormatValidator(GL_DEPTH_COMPONENT)
1008 .IsValid(GL_UNSIGNED_INT)); 1013 .IsValid(GL_UNSIGNED_INT));
1009 EXPECT_TRUE(info_->GetTextureFormatValidator(GL_DEPTH_STENCIL) 1014 EXPECT_TRUE(info_->GetTextureFormatValidator(GL_DEPTH_STENCIL)
1010 .IsValid(GL_UNSIGNED_INT_24_8)); 1015 .IsValid(GL_UNSIGNED_INT_24_8));
1011 EXPECT_TRUE(info_->feature_flags().packed_depth24_stencil8); 1016 EXPECT_TRUE(info_->feature_flags().packed_depth24_stencil8);
1012 EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_depth24")); 1017 EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_depth24"));
1013 EXPECT_TRUE( 1018 EXPECT_TRUE(
1014 info_->validators()->render_buffer_format.IsValid(GL_DEPTH_COMPONENT24)); 1019 info_->validators()->render_buffer_format.IsValid(GL_DEPTH_COMPONENT24));
1015 EXPECT_TRUE( 1020 EXPECT_TRUE(
1016 info_->validators()->render_buffer_format.IsValid(GL_DEPTH24_STENCIL8)); 1021 info_->validators()->render_buffer_format.IsValid(GL_DEPTH24_STENCIL8));
1017 EXPECT_TRUE( 1022 EXPECT_TRUE(
1018 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL)); 1023 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL));
1019 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL)); 1024 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL));
1025 EXPECT_TRUE(info_->feature_flags().npot_ok);
1026 EXPECT_TRUE(info_->feature_flags().enable_texture_half_float_linear);
1027 EXPECT_THAT(info_->extensions(),
1028 HasSubstr("GL_OES_texture_half_float_linear"));
1029 EXPECT_TRUE(info_->feature_flags().native_vertex_array_object);
1030 EXPECT_TRUE(info_->feature_flags().enable_samplers);
1031 EXPECT_TRUE(info_->feature_flags().map_buffer_range);
1032 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer);
1033 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer"));
1020 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1034 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1021 EXPECT_TRUE(gfx::GLFence::IsSupported()); 1035 EXPECT_TRUE(gfx::GLFence::IsSupported());
1022 } 1036 }
1023 1037
1024 TEST_F(FeatureInfoTest, InitializeWithoutSamplers) { 1038 TEST_F(FeatureInfoTest, InitializeWithoutSamplers) {
1025 SetupInitExpectationsWithGLVersion("", "", "OpenGL GL 3.0"); 1039 SetupInitExpectationsWithGLVersion("", "", "OpenGL GL 3.0");
1026 EXPECT_FALSE(info_->feature_flags().enable_samplers); 1040 EXPECT_FALSE(info_->feature_flags().enable_samplers);
1027 } 1041 }
1028 1042
1029 TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { 1043 TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 1109
1096 TEST_F(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) { 1110 TEST_F(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) {
1097 SetupInitExpectationsWithGLVersion("GL_NV_path_rendering", "", "4.3"); 1111 SetupInitExpectationsWithGLVersion("GL_NV_path_rendering", "", "4.3");
1098 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); 1112 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1099 EXPECT_THAT(info_->extensions(), 1113 EXPECT_THAT(info_->extensions(),
1100 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); 1114 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1101 } 1115 }
1102 1116
1103 } // namespace gles2 1117 } // namespace gles2
1104 } // namespace gpu 1118 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698