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_driver_bug_workaround_type.h" | 10 #include "gpu/command_buffer/service/gpu_driver_bug_workaround_type.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 EXPECT_FALSE(info_->feature_flags().angle_pack_reverse_row_order); | 87 EXPECT_FALSE(info_->feature_flags().angle_pack_reverse_row_order); |
88 EXPECT_FALSE(info_->feature_flags().arb_texture_rectangle); | 88 EXPECT_FALSE(info_->feature_flags().arb_texture_rectangle); |
89 EXPECT_FALSE(info_->feature_flags().angle_instanced_arrays); | 89 EXPECT_FALSE(info_->feature_flags().angle_instanced_arrays); |
90 EXPECT_FALSE(info_->feature_flags().occlusion_query_boolean); | 90 EXPECT_FALSE(info_->feature_flags().occlusion_query_boolean); |
91 EXPECT_FALSE(info_->feature_flags( | 91 EXPECT_FALSE(info_->feature_flags( |
92 ).use_arb_occlusion_query2_for_occlusion_query_boolean); | 92 ).use_arb_occlusion_query2_for_occlusion_query_boolean); |
93 EXPECT_FALSE(info_->feature_flags( | 93 EXPECT_FALSE(info_->feature_flags( |
94 ).use_arb_occlusion_query_for_occlusion_query_boolean); | 94 ).use_arb_occlusion_query_for_occlusion_query_boolean); |
95 EXPECT_FALSE(info_->feature_flags().native_vertex_array_object); | 95 EXPECT_FALSE(info_->feature_flags().native_vertex_array_object); |
96 | 96 |
97 EXPECT_FALSE(info_->workarounds().clear_alpha_in_readpixels); | 97 #define GPU_OP(type, name) EXPECT_FALSE(info_->workarounds().name); |
98 EXPECT_FALSE(info_->workarounds().clear_uniforms_before_program_use); | 98 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
99 EXPECT_FALSE(info_->workarounds().delete_instead_of_resize_fbo); | 99 #undef GPU_OP |
100 EXPECT_FALSE(info_->workarounds().disable_angle_framebuffer_multisample); | |
101 EXPECT_FALSE(info_->workarounds().disable_depth_texture); | |
102 EXPECT_FALSE(info_->workarounds().disable_ext_occlusion_query); | |
103 EXPECT_FALSE(info_->workarounds().enable_chromium_fast_npot_mo8_textures); | |
104 EXPECT_FALSE(info_->workarounds().exit_on_context_lost); | |
105 EXPECT_FALSE(info_->workarounds().flush_on_context_switch); | |
106 EXPECT_FALSE(info_->workarounds().needs_glsl_built_in_function_emulation); | |
107 EXPECT_FALSE(info_->workarounds().needs_offscreen_buffer_workaround); | |
108 EXPECT_FALSE(info_->workarounds().restore_scissor_on_fbo_change); | |
109 EXPECT_FALSE(info_->workarounds().reverse_point_sprite_coord_origin); | |
110 EXPECT_FALSE( | |
111 info_->workarounds().set_texture_filter_before_generating_mipmap); | |
112 EXPECT_FALSE(info_->workarounds().use_client_side_arrays_for_stream_buffers); | |
113 EXPECT_FALSE(info_->workarounds().use_current_program_after_successful_link); | |
114 EXPECT_EQ(0, info_->workarounds().max_texture_size); | 100 EXPECT_EQ(0, info_->workarounds().max_texture_size); |
115 EXPECT_EQ(0, info_->workarounds().max_cube_map_texture_size); | 101 EXPECT_EQ(0, info_->workarounds().max_cube_map_texture_size); |
116 | 102 |
117 // Test good types. | 103 // Test good types. |
118 { | 104 { |
119 static const GLenum kAlphaTypes[] = { | 105 static const GLenum kAlphaTypes[] = { |
120 GL_UNSIGNED_BYTE, | 106 GL_UNSIGNED_BYTE, |
121 }; | 107 }; |
122 static const GLenum kRGBTypes[] = { | 108 static const GLenum kRGBTypes[] = { |
123 GL_UNSIGNED_BYTE, | 109 GL_UNSIGNED_BYTE, |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 EXPECT_EQ(0, info_->workarounds().max_cube_map_texture_size); | 855 EXPECT_EQ(0, info_->workarounds().max_cube_map_texture_size); |
870 EXPECT_EQ(0, info_->workarounds().max_texture_size); | 856 EXPECT_EQ(0, info_->workarounds().max_texture_size); |
871 info_->AddFeatures(command_line); | 857 info_->AddFeatures(command_line); |
872 EXPECT_TRUE(info_->workarounds().exit_on_context_lost); | 858 EXPECT_TRUE(info_->workarounds().exit_on_context_lost); |
873 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); | 859 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); |
874 EXPECT_EQ(4096, info_->workarounds().max_texture_size); | 860 EXPECT_EQ(4096, info_->workarounds().max_texture_size); |
875 } | 861 } |
876 | 862 |
877 } // namespace gles2 | 863 } // namespace gles2 |
878 } // namespace gpu | 864 } // namespace gpu |
OLD | NEW |