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

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

Issue 471603003: gpu: support immutable texture on Linux Mesa driver and GLES3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Support es3 also Created 6 years, 4 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 | ui/gl/generate_bindings.py » ('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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 validators_.pixel_store.AddValue(GL_PACK_REVERSE_ROW_ORDER_ANGLE); 684 validators_.pixel_store.AddValue(GL_PACK_REVERSE_ROW_ORDER_ANGLE);
685 validators_.g_l_state.AddValue(GL_PACK_REVERSE_ROW_ORDER_ANGLE); 685 validators_.g_l_state.AddValue(GL_PACK_REVERSE_ROW_ORDER_ANGLE);
686 } 686 }
687 687
688 if (extensions.Contains("GL_ANGLE_texture_usage")) { 688 if (extensions.Contains("GL_ANGLE_texture_usage")) {
689 feature_flags_.angle_texture_usage = true; 689 feature_flags_.angle_texture_usage = true;
690 AddExtensionString("GL_ANGLE_texture_usage"); 690 AddExtensionString("GL_ANGLE_texture_usage");
691 validators_.texture_parameter.AddValue(GL_TEXTURE_USAGE_ANGLE); 691 validators_.texture_parameter.AddValue(GL_TEXTURE_USAGE_ANGLE);
692 } 692 }
693 693
694 if (extensions.Contains("GL_EXT_texture_storage")) { 694 if (extensions.Contains("GL_EXT_texture_storage") ||
695 extensions.Contains("GL_ARB_texture_storage") ||
696 is_es3) {
695 feature_flags_.ext_texture_storage = true; 697 feature_flags_.ext_texture_storage = true;
696 AddExtensionString("GL_EXT_texture_storage"); 698 AddExtensionString("GL_EXT_texture_storage");
697 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); 699 validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT);
698 if (enable_texture_format_bgra8888) 700 if (enable_texture_format_bgra8888)
699 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT); 701 validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT);
700 if (enable_texture_float) { 702 if (enable_texture_float) {
701 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT); 703 validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT);
702 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT); 704 validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT);
703 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT); 705 validators_.texture_internal_format_storage.AddValue(GL_ALPHA32F_EXT);
704 validators_.texture_internal_format_storage.AddValue( 706 validators_.texture_internal_format_storage.AddValue(
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 if (pos == std::string::npos) { 846 if (pos == std::string::npos) {
845 extensions_ += (extensions_.empty() ? "" : " ") + str; 847 extensions_ += (extensions_.empty() ? "" : " ") + str;
846 } 848 }
847 } 849 }
848 850
849 FeatureInfo::~FeatureInfo() { 851 FeatureInfo::~FeatureInfo() {
850 } 852 }
851 853
852 } // namespace gles2 854 } // namespace gles2
853 } // namespace gpu 855 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | ui/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698