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

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

Issue 2934733002: Workaround for Intel 6xxx clear to 0/1 bug (Closed)
Patch Set: rebase and move workarounds to gl_context Created 3 years, 6 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>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/metrics/histogram_macros.h" 13 #include "base/metrics/histogram_macros.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
16 #include "gpu/command_buffer/service/gpu_switches.h" 16 #include "gpu/command_buffer/service/gpu_switches.h"
17 #include "gpu/command_buffer/service/texture_definition.h" 17 #include "gpu/command_buffer/service/texture_definition.h"
18 #include "gpu/config/gpu_switches.h" 18 #include "gpu/config/gpu_switches.h"
19 #include "ui/gl/gl_bindings.h" 19 #include "ui/gl/gl_bindings.h"
20 #include "ui/gl/gl_context.h"
20 #include "ui/gl/gl_fence.h" 21 #include "ui/gl/gl_fence.h"
21 #include "ui/gl/gl_implementation.h" 22 #include "ui/gl/gl_implementation.h"
22 #include "ui/gl/gl_switches.h" 23 #include "ui/gl/gl_switches.h"
23 #include "ui/gl/gl_version_info.h" 24 #include "ui/gl/gl_version_info.h"
24 25
25 #if !defined(OS_MACOSX) 26 #if !defined(OS_MACOSX)
26 #include "ui/gl/gl_fence_egl.h" 27 #include "ui/gl/gl_fence_egl.h"
27 #endif 28 #endif
28 29
29 namespace gpu { 30 namespace gpu {
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 551
551 // Check if we should enable GL_EXT_texture_filter_anisotropic. 552 // Check if we should enable GL_EXT_texture_filter_anisotropic.
552 if (extensions.Contains("GL_EXT_texture_filter_anisotropic")) { 553 if (extensions.Contains("GL_EXT_texture_filter_anisotropic")) {
553 AddExtensionString("GL_EXT_texture_filter_anisotropic"); 554 AddExtensionString("GL_EXT_texture_filter_anisotropic");
554 validators_.texture_parameter.AddValue( 555 validators_.texture_parameter.AddValue(
555 GL_TEXTURE_MAX_ANISOTROPY_EXT); 556 GL_TEXTURE_MAX_ANISOTROPY_EXT);
556 validators_.g_l_state.AddValue( 557 validators_.g_l_state.AddValue(
557 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT); 558 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT);
558 } 559 }
559 560
561 // Pass some workarounds to ui/gl so that we can apply it in gl api.
562 gl::GLWorkarounds glWorkarounds;
Zhenyao Mo 2017/06/20 21:34:17 gl_workarounds
jiajia.qin 2017/06/21 02:47:22 Done.
563 if (workarounds_.clear_to_boundary_values_is_broken) {
564 glWorkarounds.clearToBoundaryValuesIsBroken = true;
565 }
566 gl::SetGLWorkarounds(glWorkarounds);
567
560 // Check if we should support GL_OES_packed_depth_stencil and/or 568 // Check if we should support GL_OES_packed_depth_stencil and/or
561 // GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture. 569 // GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture.
562 // 570 //
563 // NOTE: GL_OES_depth_texture requires support for depth cubemaps. 571 // NOTE: GL_OES_depth_texture requires support for depth cubemaps.
564 // GL_ARB_depth_texture requires other features that 572 // GL_ARB_depth_texture requires other features that
565 // GL_OES_packed_depth_stencil does not provide. 573 // GL_OES_packed_depth_stencil does not provide.
566 // 574 //
567 // Therefore we made up GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture. 575 // Therefore we made up GL_GOOGLE_depth_texture / GL_CHROMIUM_depth_texture.
568 // 576 //
569 // GL_GOOGLE_depth_texture is legacy. As we exposed it into NaCl we can't 577 // GL_GOOGLE_depth_texture is legacy. As we exposed it into NaCl we can't
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 if (pos == std::string::npos) { 1748 if (pos == std::string::npos) {
1741 extensions_ += (extensions_.empty() ? "" : " ") + str; 1749 extensions_ += (extensions_.empty() ? "" : " ") + str;
1742 } 1750 }
1743 } 1751 }
1744 1752
1745 FeatureInfo::~FeatureInfo() { 1753 FeatureInfo::~FeatureInfo() {
1746 } 1754 }
1747 1755
1748 } // namespace gles2 1756 } // namespace gles2
1749 } // namespace gpu 1757 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_driver_bug_list.json » ('j') | gpu/config/gpu_driver_bug_workaround_type.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698