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

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

Issue 139013008: Implement support for rendering to 32-bit float textures on ES3 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 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 <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 npot_ok = true; 434 npot_ok = true;
435 } 435 }
436 436
437 // Check if we should allow GL_OES_texture_float, GL_OES_texture_half_float, 437 // Check if we should allow GL_OES_texture_float, GL_OES_texture_half_float,
438 // GL_OES_texture_float_linear, GL_OES_texture_half_float_linear 438 // GL_OES_texture_float_linear, GL_OES_texture_half_float_linear
439 bool enable_texture_float = false; 439 bool enable_texture_float = false;
440 bool enable_texture_float_linear = false; 440 bool enable_texture_float_linear = false;
441 bool enable_texture_half_float = false; 441 bool enable_texture_half_float = false;
442 bool enable_texture_half_float_linear = false; 442 bool enable_texture_half_float_linear = false;
443 443
444 bool have_arb_texture_float = extensions.Contains("GL_ARB_texture_float"); 444 if (extensions.Contains("GL_ARB_texture_float")) {
445
446 if (have_arb_texture_float) {
447 enable_texture_float = true; 445 enable_texture_float = true;
448 enable_texture_float_linear = true; 446 enable_texture_float_linear = true;
449 enable_texture_half_float = true; 447 enable_texture_half_float = true;
450 enable_texture_half_float_linear = true; 448 enable_texture_half_float_linear = true;
451 } else { 449 } else {
452 if (extensions.Contains("GL_OES_texture_float") || have_arb_texture_float) { 450 if (extensions.Contains("GL_OES_texture_float")) {
453 enable_texture_float = true; 451 enable_texture_float = true;
454 if (extensions.Contains("GL_OES_texture_float_linear") || 452 if (extensions.Contains("GL_OES_texture_float_linear")) {
455 have_arb_texture_float) {
456 enable_texture_float_linear = true; 453 enable_texture_float_linear = true;
457 } 454 }
458 } 455 }
459 if (extensions.Contains("GL_OES_texture_half_float") || 456 if (extensions.Contains("GL_OES_texture_half_float")) {
460 have_arb_texture_float) {
461 enable_texture_half_float = true; 457 enable_texture_half_float = true;
462 if (extensions.Contains("GL_OES_texture_half_float_linear") || 458 if (extensions.Contains("GL_OES_texture_half_float_linear")) {
463 have_arb_texture_float) {
464 enable_texture_half_float_linear = true; 459 enable_texture_half_float_linear = true;
465 } 460 }
466 } 461 }
467 } 462 }
468 463
469 if (enable_texture_float) { 464 if (enable_texture_float) {
470 texture_format_validators_[GL_ALPHA].AddValue(GL_FLOAT); 465 texture_format_validators_[GL_ALPHA].AddValue(GL_FLOAT);
471 texture_format_validators_[GL_RGB].AddValue(GL_FLOAT); 466 texture_format_validators_[GL_RGB].AddValue(GL_FLOAT);
472 texture_format_validators_[GL_RGBA].AddValue(GL_FLOAT); 467 texture_format_validators_[GL_RGBA].AddValue(GL_FLOAT);
473 texture_format_validators_[GL_LUMINANCE].AddValue(GL_FLOAT); 468 texture_format_validators_[GL_LUMINANCE].AddValue(GL_FLOAT);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 if (extensions_.find(str) == std::string::npos) { 721 if (extensions_.find(str) == std::string::npos) {
727 extensions_ += (extensions_.empty() ? "" : " ") + str; 722 extensions_ += (extensions_.empty() ? "" : " ") + str;
728 } 723 }
729 } 724 }
730 725
731 FeatureInfo::~FeatureInfo() { 726 FeatureInfo::~FeatureInfo() {
732 } 727 }
733 728
734 } // namespace gles2 729 } // namespace gles2
735 } // namespace gpu 730 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | ui/gl/gl_gl_api_implementation.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698