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

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

Issue 1872663002: Enable TexStorage on Desktop GL lower than 4.2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 <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
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))) {
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
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
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698