Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1027 // claim to handle GL_BGRA8. | 1027 // claim to handle GL_BGRA8. |
| 1028 bool support_texture_storage_on_es3 = | 1028 bool support_texture_storage_on_es3 = |
| 1029 (gl_version_info_->is_es3 && | 1029 (gl_version_info_->is_es3 && |
| 1030 enable_immutable_texture_format_bgra_on_es3) || | 1030 enable_immutable_texture_format_bgra_on_es3) || |
| 1031 (gl_version_info_->is_es3 && | 1031 (gl_version_info_->is_es3 && |
| 1032 !enable_texture_format_bgra8888); | 1032 !enable_texture_format_bgra8888); |
| 1033 if (!workarounds_.disable_texture_storage && | 1033 if (!workarounds_.disable_texture_storage && |
| 1034 (extensions.Contains("GL_EXT_texture_storage") || | 1034 (extensions.Contains("GL_EXT_texture_storage") || |
| 1035 extensions.Contains("GL_ARB_texture_storage") || | 1035 extensions.Contains("GL_ARB_texture_storage") || |
| 1036 support_texture_storage_on_es3 || | 1036 support_texture_storage_on_es3 || |
| 1037 gl_version_info_->is_desktop_core_profile)) { | 1037 gl_version_info_->IsAtLeastGL(4, 2))) { |
|
piman
2016/04/11 22:59:31
I'm a bit confused... Is the goal to expose GL_EXT
Zhenyao Mo
2016/04/11 23:17:19
My bad. I got my two different options mixed.
Op
| |
| 1038 feature_flags_.ext_texture_storage = true; | 1038 feature_flags_.ext_texture_storage = true; |
| 1039 AddExtensionString("GL_EXT_texture_storage"); | 1039 AddExtensionString("GL_EXT_texture_storage"); |
| 1040 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); | 1040 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); |
| 1041 if (enable_texture_format_bgra8888) | 1041 if (enable_texture_format_bgra8888) |
| 1042 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); | 1042 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); |
| 1043 if (enable_texture_float) { | 1043 if (enable_texture_float) { |
| 1044 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); | 1044 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); |
| 1045 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); | 1045 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); |
| 1046 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); | 1046 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); |
| 1047 validators_.texture_internal_format_storage.AddValue( | 1047 validators_.texture_internal_format_storage.AddValue( |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1424 if (pos == std::string::npos) { | 1424 if (pos == std::string::npos) { |
| 1425 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1425 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1426 } | 1426 } |
| 1427 } | 1427 } |
| 1428 | 1428 |
| 1429 FeatureInfo::~FeatureInfo() { | 1429 FeatureInfo::~FeatureInfo() { |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 } // namespace gles2 | 1432 } // namespace gles2 |
| 1433 } // namespace gpu | 1433 } // namespace gpu |
| OLD | NEW |