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 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 // ES3's glTexStorage2D. We prefer support BGRA to texture storage. | 814 // ES3's glTexStorage2D. We prefer support BGRA to texture storage. |
815 // So we don't expose GL_EXT_texture_storage when ES3 + | 815 // So we don't expose GL_EXT_texture_storage when ES3 + |
816 // GL_EXT_texture_format_BGRA8888 because we fail the GL_BGRA8 requirement. | 816 // GL_EXT_texture_format_BGRA8888 because we fail the GL_BGRA8 requirement. |
817 // However we expose GL_EXT_texture_storage when just ES3 because we don't | 817 // However we expose GL_EXT_texture_storage when just ES3 because we don't |
818 // claim to handle GL_BGRA8. | 818 // claim to handle GL_BGRA8. |
819 bool support_texture_storage_on_es3 = | 819 bool support_texture_storage_on_es3 = |
820 (gl_version_info_->is_es3 && | 820 (gl_version_info_->is_es3 && |
821 enable_immutable_texture_format_bgra_on_es3) || | 821 enable_immutable_texture_format_bgra_on_es3) || |
822 (gl_version_info_->is_es3 && | 822 (gl_version_info_->is_es3 && |
823 !enable_texture_format_bgra8888); | 823 !enable_texture_format_bgra8888); |
824 if (extensions.Contains("GL_EXT_texture_storage") || | 824 if (!workarounds_.disable_texture_storage && |
825 extensions.Contains("GL_ARB_texture_storage") || | 825 (extensions.Contains("GL_EXT_texture_storage") || |
826 support_texture_storage_on_es3 || | 826 extensions.Contains("GL_ARB_texture_storage") || |
827 gl_version_info_->is_desktop_core_profile) { | 827 support_texture_storage_on_es3 || |
| 828 gl_version_info_->is_desktop_core_profile)) { |
828 feature_flags_.ext_texture_storage = true; | 829 feature_flags_.ext_texture_storage = true; |
829 AddExtensionString("GL_EXT_texture_storage"); | 830 AddExtensionString("GL_EXT_texture_storage"); |
830 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); | 831 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); |
831 if (enable_texture_format_bgra8888) | 832 if (enable_texture_format_bgra8888) |
832 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); | 833 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); |
833 if (enable_texture_float) { | 834 if (enable_texture_float) { |
834 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); | 835 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); |
835 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); | 836 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); |
836 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); | 837 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); |
837 validators_.texture_internal_format_storage.AddValue( | 838 validators_.texture_internal_format_storage.AddValue( |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 if (pos == std::string::npos) { | 1156 if (pos == std::string::npos) { |
1156 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1157 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1157 } | 1158 } |
1158 } | 1159 } |
1159 | 1160 |
1160 FeatureInfo::~FeatureInfo() { | 1161 FeatureInfo::~FeatureInfo() { |
1161 } | 1162 } |
1162 | 1163 |
1163 } // namespace gles2 | 1164 } // namespace gles2 |
1164 } // namespace gpu | 1165 } // namespace gpu |
OLD | NEW |