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

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

Issue 2363773007: Command buffer should not report depth_texture on pure ES3 without depth_texture extension. (Closed)
Patch Set: fix unittests Created 4 years, 2 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 | gpu/command_buffer/service/feature_info_unittest.cc » ('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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Therefore we made up GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture. 504 // Therefore we made up GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture.
505 // 505 //
506 // GL_GOOGLE_depth_texture is legacy. As we exposed it into NaCl we can't 506 // GL_GOOGLE_depth_texture is legacy. As we exposed it into NaCl we can't
507 // get rid of it. 507 // get rid of it.
508 // 508 //
509 bool enable_depth_texture = false; 509 bool enable_depth_texture = false;
510 if (!workarounds_.disable_depth_texture && 510 if (!workarounds_.disable_depth_texture &&
511 (extensions.Contains("GL_ARB_depth_texture") || 511 (extensions.Contains("GL_ARB_depth_texture") ||
512 extensions.Contains("GL_OES_depth_texture") || 512 extensions.Contains("GL_OES_depth_texture") ||
513 extensions.Contains("GL_ANGLE_depth_texture") || 513 extensions.Contains("GL_ANGLE_depth_texture") ||
514 gl_version_info_->is_es3 ||
515 gl_version_info_->is_desktop_core_profile)) { 514 gl_version_info_->is_desktop_core_profile)) {
515 // Note that we don't expose depth_texture extenion on top of ES3 if
516 // the depth_texture extension isn't exposed by the ES3 driver.
517 // This is because depth textures are filterable under linear mode in
518 // ES2 + extension, but not in core ES3.
516 enable_depth_texture = true; 519 enable_depth_texture = true;
517 feature_flags_.angle_depth_texture = 520 feature_flags_.angle_depth_texture =
518 extensions.Contains("GL_ANGLE_depth_texture"); 521 extensions.Contains("GL_ANGLE_depth_texture");
519 } 522 }
520 523
521 if (enable_depth_texture) { 524 if (enable_depth_texture) {
522 AddExtensionString("GL_CHROMIUM_depth_texture"); 525 AddExtensionString("GL_CHROMIUM_depth_texture");
523 AddExtensionString("GL_GOOGLE_depth_texture"); 526 AddExtensionString("GL_GOOGLE_depth_texture");
524 validators_.texture_internal_format.AddValue(GL_DEPTH_COMPONENT); 527 validators_.texture_internal_format.AddValue(GL_DEPTH_COMPONENT);
525 validators_.texture_format.AddValue(GL_DEPTH_COMPONENT); 528 validators_.texture_format.AddValue(GL_DEPTH_COMPONENT);
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 if (pos == std::string::npos) { 1535 if (pos == std::string::npos) {
1533 extensions_ += (extensions_.empty() ? "" : " ") + str; 1536 extensions_ += (extensions_.empty() ? "" : " ") + str;
1534 } 1537 }
1535 } 1538 }
1536 1539
1537 FeatureInfo::~FeatureInfo() { 1540 FeatureInfo::~FeatureInfo() {
1538 } 1541 }
1539 1542
1540 } // namespace gles2 1543 } // namespace gles2
1541 } // namespace gpu 1544 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698