| 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 if (extensions.Contains("GL_ANGLE_texture_usage")) { | 1015 if (extensions.Contains("GL_ANGLE_texture_usage")) { |
| 1016 feature_flags_.angle_texture_usage = true; | 1016 feature_flags_.angle_texture_usage = true; |
| 1017 AddExtensionString("GL_ANGLE_texture_usage"); | 1017 AddExtensionString("GL_ANGLE_texture_usage"); |
| 1018 validators_.texture_parameter.AddValue(GL_TEXTURE_USAGE_ANGLE); | 1018 validators_.texture_parameter.AddValue(GL_TEXTURE_USAGE_ANGLE); |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 if (enable_texture_storage) { | 1021 if (enable_texture_storage) { |
| 1022 feature_flags_.ext_texture_storage = true; | 1022 feature_flags_.ext_texture_storage = true; |
| 1023 AddExtensionString("GL_EXT_texture_storage"); | 1023 AddExtensionString("GL_EXT_texture_storage"); |
| 1024 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); | 1024 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); |
| 1025 if (enable_texture_format_bgra8888) | 1025 if (enable_texture_format_bgra8888) { |
| 1026 validators_.texture_internal_format.AddValue(GL_BGRA8_EXT); |
| 1026 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); | 1027 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); |
| 1028 validators_.texture_sized_color_renderable_internal_format.AddValue( |
| 1029 GL_BGRA8_EXT); |
| 1030 } |
| 1027 if (enable_texture_float) { | 1031 if (enable_texture_float) { |
| 1028 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); | 1032 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); |
| 1029 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); | 1033 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); |
| 1030 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); | 1034 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); |
| 1031 validators_.texture_internal_format_storage.AddValue( | 1035 validators_.texture_internal_format_storage.AddValue( |
| 1032 GL_LUMINANCE32F_EXT); | 1036 GL_LUMINANCE32F_EXT); |
| 1033 validators_.texture_internal_format_storage.AddValue( | 1037 validators_.texture_internal_format_storage.AddValue( |
| 1034 GL_LUMINANCE_ALPHA32F_EXT); | 1038 GL_LUMINANCE_ALPHA32F_EXT); |
| 1035 } | 1039 } |
| 1036 if (enable_texture_half_float) { | 1040 if (enable_texture_half_float) { |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 if (pos == std::string::npos) { | 1416 if (pos == std::string::npos) { |
| 1413 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1417 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1414 } | 1418 } |
| 1415 } | 1419 } |
| 1416 | 1420 |
| 1417 FeatureInfo::~FeatureInfo() { | 1421 FeatureInfo::~FeatureInfo() { |
| 1418 } | 1422 } |
| 1419 | 1423 |
| 1420 } // namespace gles2 | 1424 } // namespace gles2 |
| 1421 } // namespace gpu | 1425 } // namespace gpu |
| OLD | NEW |