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

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

Issue 1106833002: Emulate GL_PRIMITIVE_RESTART_FIXED_INDEX: part I (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments Created 5 years, 8 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 <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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 map_buffer_range(false), 154 map_buffer_range(false),
155 ext_discard_framebuffer(false), 155 ext_discard_framebuffer(false),
156 angle_depth_texture(false), 156 angle_depth_texture(false),
157 is_swiftshader(false), 157 is_swiftshader(false),
158 angle_texture_usage(false), 158 angle_texture_usage(false),
159 ext_texture_storage(false), 159 ext_texture_storage(false),
160 chromium_path_rendering(false), 160 chromium_path_rendering(false),
161 blend_equation_advanced(false), 161 blend_equation_advanced(false),
162 blend_equation_advanced_coherent(false), 162 blend_equation_advanced_coherent(false),
163 ext_texture_rg(false), 163 ext_texture_rg(false),
164 enable_subscribe_uniform(false) { 164 enable_subscribe_uniform(false),
165 emulate_primitive_restart_fixed_index(false) {
165 } 166 }
166 167
167 FeatureInfo::Workarounds::Workarounds() : 168 FeatureInfo::Workarounds::Workarounds() :
168 #define GPU_OP(type, name) name(false), 169 #define GPU_OP(type, name) name(false),
169 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) 170 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
170 #undef GPU_OP 171 #undef GPU_OP
171 max_texture_size(0), 172 max_texture_size(0),
172 max_cube_map_texture_size(0), 173 max_cube_map_texture_size(0),
173 max_fragment_uniform_vectors(0), 174 max_fragment_uniform_vectors(0),
174 max_varying_vectors(0), 175 max_varying_vectors(0),
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 texture_format_validators_[GL_RG_EXT].AddValue(GL_HALF_FLOAT_OES); 1091 texture_format_validators_[GL_RG_EXT].AddValue(GL_HALF_FLOAT_OES);
1091 } 1092 }
1092 } 1093 }
1093 UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg); 1094 UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg);
1094 1095
1095 #if !defined(OS_MACOSX) 1096 #if !defined(OS_MACOSX)
1096 if (workarounds_.ignore_egl_sync_failures) { 1097 if (workarounds_.ignore_egl_sync_failures) {
1097 gfx::GLFenceEGL::SetIgnoreFailures(); 1098 gfx::GLFenceEGL::SetIgnoreFailures();
1098 } 1099 }
1099 #endif 1100 #endif
1101
1102 if (gl_version_info_->IsLowerThanGL(4, 3)) {
1103 // crbug.com/481184.
1104 // GL_PRIMITIVE_RESTART_FIXED_INDEX is only available on Desktop GL 4.3+,
1105 // but we emulate ES 3.0 on top of Desktop GL 4.2+.
1106 feature_flags_.emulate_primitive_restart_fixed_index = true;
1107 }
1100 } 1108 }
1101 1109
1102 bool FeatureInfo::IsES3Capable() const { 1110 bool FeatureInfo::IsES3Capable() const {
1103 if (gl_version_info_->IsAtLeastGLES(3, 0)) 1111 if (gl_version_info_->IsAtLeastGLES(3, 0))
1104 return true; 1112 return true;
1105 // TODO(zmo): For Desktop GL, with anything lower than 4.2, we need to check 1113 // TODO(zmo): For Desktop GL, with anything lower than 4.2, we need to check
1106 // the existence of a few extensions to have full WebGL 2 capabilities. 1114 // the existence of a few extensions to have full WebGL 2 capabilities.
1107 if (gl_version_info_->IsAtLeastGL(4, 2)) 1115 if (gl_version_info_->IsAtLeastGL(4, 2))
1108 return true; 1116 return true;
1109 #if defined(OS_MACOSX) 1117 #if defined(OS_MACOSX)
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 if (pos == std::string::npos) { 1194 if (pos == std::string::npos) {
1187 extensions_ += (extensions_.empty() ? "" : " ") + str; 1195 extensions_ += (extensions_.empty() ? "" : " ") + str;
1188 } 1196 }
1189 } 1197 }
1190 1198
1191 FeatureInfo::~FeatureInfo() { 1199 FeatureInfo::~FeatureInfo() {
1192 } 1200 }
1193 1201
1194 } // namespace gles2 1202 } // namespace gles2
1195 } // namespace gpu 1203 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698