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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 } | 89 } |
90 if (workarounds->max_texture_size_limit_4096) | 90 if (workarounds->max_texture_size_limit_4096) |
91 workarounds->max_texture_size = 4096; | 91 workarounds->max_texture_size = 4096; |
92 if (workarounds->max_cube_map_texture_size_limit_4096) | 92 if (workarounds->max_cube_map_texture_size_limit_4096) |
93 workarounds->max_cube_map_texture_size = 4096; | 93 workarounds->max_cube_map_texture_size = 4096; |
94 if (workarounds->max_cube_map_texture_size_limit_1024) | 94 if (workarounds->max_cube_map_texture_size_limit_1024) |
95 workarounds->max_cube_map_texture_size = 1024; | 95 workarounds->max_cube_map_texture_size = 1024; |
96 if (workarounds->max_cube_map_texture_size_limit_512) | 96 if (workarounds->max_cube_map_texture_size_limit_512) |
97 workarounds->max_cube_map_texture_size = 512; | 97 workarounds->max_cube_map_texture_size = 512; |
| 98 |
| 99 if (workarounds->max_fragment_uniform_vectors_32) |
| 100 workarounds->max_fragment_uniform_vectors = 32; |
| 101 if (workarounds->max_varying_vectors_16) |
| 102 workarounds->max_varying_vectors = 16; |
| 103 if (workarounds->max_vertex_uniform_vectors_256) |
| 104 workarounds->max_vertex_uniform_vectors = 256; |
98 } | 105 } |
99 | 106 |
100 } // anonymous namespace. | 107 } // anonymous namespace. |
101 | 108 |
102 FeatureInfo::FeatureFlags::FeatureFlags() | 109 FeatureInfo::FeatureFlags::FeatureFlags() |
103 : chromium_color_buffer_float_rgba(false), | 110 : chromium_color_buffer_float_rgba(false), |
104 chromium_color_buffer_float_rgb(false), | 111 chromium_color_buffer_float_rgb(false), |
105 chromium_framebuffer_multisample(false), | 112 chromium_framebuffer_multisample(false), |
106 use_core_framebuffer_multisample(false), | 113 use_core_framebuffer_multisample(false), |
107 multisampled_render_to_texture(false), | 114 multisampled_render_to_texture(false), |
(...skipping 28 matching lines...) Expand all Loading... |
136 is_swiftshader(false), | 143 is_swiftshader(false), |
137 angle_texture_usage(false), | 144 angle_texture_usage(false), |
138 ext_texture_storage(false) { | 145 ext_texture_storage(false) { |
139 } | 146 } |
140 | 147 |
141 FeatureInfo::Workarounds::Workarounds() : | 148 FeatureInfo::Workarounds::Workarounds() : |
142 #define GPU_OP(type, name) name(false), | 149 #define GPU_OP(type, name) name(false), |
143 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 150 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
144 #undef GPU_OP | 151 #undef GPU_OP |
145 max_texture_size(0), | 152 max_texture_size(0), |
146 max_cube_map_texture_size(0) { | 153 max_cube_map_texture_size(0), |
| 154 max_fragment_uniform_vectors(0), |
| 155 max_varying_vectors(0), |
| 156 max_vertex_uniform_vectors(0) { |
147 } | 157 } |
148 | 158 |
149 FeatureInfo::FeatureInfo() { | 159 FeatureInfo::FeatureInfo() { |
150 InitializeBasicState(*CommandLine::ForCurrentProcess()); | 160 InitializeBasicState(*CommandLine::ForCurrentProcess()); |
151 } | 161 } |
152 | 162 |
153 FeatureInfo::FeatureInfo(const CommandLine& command_line) { | 163 FeatureInfo::FeatureInfo(const CommandLine& command_line) { |
154 InitializeBasicState(command_line); | 164 InitializeBasicState(command_line); |
155 } | 165 } |
156 | 166 |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 if (pos == std::string::npos) { | 807 if (pos == std::string::npos) { |
798 extensions_ += (extensions_.empty() ? "" : " ") + str; | 808 extensions_ += (extensions_.empty() ? "" : " ") + str; |
799 } | 809 } |
800 } | 810 } |
801 | 811 |
802 FeatureInfo::~FeatureInfo() { | 812 FeatureInfo::~FeatureInfo() { |
803 } | 813 } |
804 | 814 |
805 } // namespace gles2 | 815 } // namespace gles2 |
806 } // namespace gpu | 816 } // namespace gpu |
OLD | NEW |