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

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

Issue 1301053002: gpu: introduce DISABLE_TEXTURE_STORAGE workaround for mesa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply < 10.6 Created 5 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
« no previous file with comments | « no previous file | gpu/command_buffer/tests/gl_texture_storage_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 // ES3's glTexStorage2D. We prefer support BGRA to texture storage. 838 // ES3's glTexStorage2D. We prefer support BGRA to texture storage.
839 // So we don't expose GL_EXT_texture_storage when ES3 + 839 // So we don't expose GL_EXT_texture_storage when ES3 +
840 // GL_EXT_texture_format_BGRA8888 because we fail the GL_BGRA8 requirement. 840 // GL_EXT_texture_format_BGRA8888 because we fail the GL_BGRA8 requirement.
841 // However we expose GL_EXT_texture_storage when just ES3 because we don't 841 // However we expose GL_EXT_texture_storage when just ES3 because we don't
842 // claim to handle GL_BGRA8. 842 // claim to handle GL_BGRA8.
843 bool support_texture_storage_on_es3 = 843 bool support_texture_storage_on_es3 =
844 (gl_version_info_->is_es3 && 844 (gl_version_info_->is_es3 &&
845 enable_immutable_texture_format_bgra_on_es3) || 845 enable_immutable_texture_format_bgra_on_es3) ||
846 (gl_version_info_->is_es3 && 846 (gl_version_info_->is_es3 &&
847 !enable_texture_format_bgra8888); 847 !enable_texture_format_bgra8888);
848 if (extensions.Contains("GL_EXT_texture_storage") || 848 if (!workarounds_.disable_texture_storage &&
849 extensions.Contains("GL_ARB_texture_storage") || 849 (extensions.Contains("GL_EXT_texture_storage") ||
850 support_texture_storage_on_es3 || 850 extensions.Contains("GL_ARB_texture_storage") ||
851 gl_version_info_->is_desktop_core_profile) { 851 support_texture_storage_on_es3 ||
852 gl_version_info_->is_desktop_core_profile)) {
852 feature_flags_.ext_texture_storage = true; 853 feature_flags_.ext_texture_storage = true;
853 AddExtensionString("GL_EXT_texture_storage"); 854 AddExtensionString("GL_EXT_texture_storage");
854 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); 855 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT);
855 if (enable_texture_format_bgra8888) 856 if (enable_texture_format_bgra8888)
856 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); 857 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT);
857 if (enable_texture_float) { 858 if (enable_texture_float) {
858 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); 859 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT);
859 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); 860 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT);
860 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); 861 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT);
861 validators_.texture_internal_format_storage.AddValue( 862 validators_.texture_internal_format_storage.AddValue(
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 if (pos == std::string::npos) { 1180 if (pos == std::string::npos) {
1180 extensions_ += (extensions_.empty() ? "" : " ") + str; 1181 extensions_ += (extensions_.empty() ? "" : " ") + str;
1181 } 1182 }
1182 } 1183 }
1183 1184
1184 FeatureInfo::~FeatureInfo() { 1185 FeatureInfo::~FeatureInfo() {
1185 } 1186 }
1186 1187
1187 } // namespace gles2 1188 } // namespace gles2
1188 } // namespace gpu 1189 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/tests/gl_texture_storage_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698