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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 validators_.texture_parameter.AddValue(GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES); | 622 validators_.texture_parameter.AddValue(GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES); |
623 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); | 623 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); |
624 } | 624 } |
625 | 625 |
626 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) { | 626 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) { |
627 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); | 627 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); |
628 feature_flags_.oes_compressed_etc1_rgb8_texture = true; | 628 feature_flags_.oes_compressed_etc1_rgb8_texture = true; |
629 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); | 629 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); |
630 } | 630 } |
631 | 631 |
| 632 if (extensions.Contains("GL_AMD_compressed_ATC_texture")) { |
| 633 AddExtensionString("GL_AMD_compressed_ATC_texture"); |
| 634 validators_.compressed_texture_format.AddValue( |
| 635 GL_ATC_RGB_AMD); |
| 636 validators_.compressed_texture_format.AddValue( |
| 637 GL_ATC_RGBA_EXPLICIT_ALPHA_AMD); |
| 638 validators_.compressed_texture_format.AddValue( |
| 639 GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD); |
| 640 } |
| 641 |
| 642 if (extensions.Contains("GL_IMG_texture_compression_pvrtc")) { |
| 643 AddExtensionString("GL_IMG_texture_compression_pvrtc"); |
| 644 validators_.compressed_texture_format.AddValue( |
| 645 GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG); |
| 646 validators_.compressed_texture_format.AddValue( |
| 647 GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG); |
| 648 validators_.compressed_texture_format.AddValue( |
| 649 GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG); |
| 650 validators_.compressed_texture_format.AddValue( |
| 651 GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG); |
| 652 } |
| 653 |
632 // Ideally we would only expose this extension on Mac OS X, to | 654 // Ideally we would only expose this extension on Mac OS X, to |
633 // support GL_CHROMIUM_iosurface and the compositor. We don't want | 655 // support GL_CHROMIUM_iosurface and the compositor. We don't want |
634 // applications to start using it; they should use ordinary non- | 656 // applications to start using it; they should use ordinary non- |
635 // power-of-two textures. However, for unit testing purposes we | 657 // power-of-two textures. However, for unit testing purposes we |
636 // expose it on all supported platforms. | 658 // expose it on all supported platforms. |
637 if (extensions.Contains("GL_ARB_texture_rectangle")) { | 659 if (extensions.Contains("GL_ARB_texture_rectangle")) { |
638 AddExtensionString("GL_ARB_texture_rectangle"); | 660 AddExtensionString("GL_ARB_texture_rectangle"); |
639 feature_flags_.arb_texture_rectangle = true; | 661 feature_flags_.arb_texture_rectangle = true; |
640 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); | 662 validators_.texture_bind_target.AddValue(GL_TEXTURE_RECTANGLE_ARB); |
641 // For the moment we don't add this enum to the texture_target | 663 // For the moment we don't add this enum to the texture_target |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 if (pos == std::string::npos) { | 837 if (pos == std::string::npos) { |
816 extensions_ += (extensions_.empty() ? "" : " ") + str; | 838 extensions_ += (extensions_.empty() ? "" : " ") + str; |
817 } | 839 } |
818 } | 840 } |
819 | 841 |
820 FeatureInfo::~FeatureInfo() { | 842 FeatureInfo::~FeatureInfo() { |
821 } | 843 } |
822 | 844 |
823 } // namespace gles2 | 845 } // namespace gles2 |
824 } // namespace gpu | 846 } // namespace gpu |
OLD | NEW |