summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorericrk <ericrk@chromium.org>2016-03-18 14:44:31 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-18 21:45:56 +0000
commitd72af43d432d9def9ce591b7167c19b7b1581e30 (patch)
tree811d9218dc7488e56e28aec2f29e2a001fe31575 /gpu
parent6f495a8a85da6d8e34cc649e091033e8a441d846 (diff)
downloadchromium_src-d72af43d432d9def9ce591b7167c19b7b1581e30.zip
chromium_src-d72af43d432d9def9ce591b7167c19b7b1581e30.tar.gz
chromium_src-d72af43d432d9def9ce591b7167c19b7b1581e30.tar.bz2
Add CONTEXT_TYPE_OPENGLES2_PEPPER
Adds a new context type for Pepper GL contexts. This allows us to fine tune driver bug workarounds for pepper vs. non-pepper contexts. Currently used to disable the Intel MSAA blacklist on pepper contexts, as it should be up to the app whether to use MSAA. BUG=527565 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1781093002 Cr-Commit-Position: refs/heads/master@{#382097}
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/common/capabilities.cc1
-rw-r--r--gpu/command_buffer/common/capabilities.h1
-rw-r--r--gpu/command_buffer/service/feature_info.cc18
-rw-r--r--gpu/command_buffer/service/feature_info_unittest.cc37
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc1
-rw-r--r--gpu/config/gpu_driver_bug_list_json.cc4
-rw-r--r--gpu/config/gpu_driver_bug_workaround_type.h4
7 files changed, 11 insertions, 55 deletions
diff --git a/gpu/command_buffer/common/capabilities.cc b/gpu/command_buffer/common/capabilities.cc
index e9203e8..23d1abb 100644
--- a/gpu/command_buffer/common/capabilities.cc
+++ b/gpu/command_buffer/common/capabilities.cc
@@ -83,6 +83,7 @@ Capabilities::Capabilities()
timer_queries(false),
surfaceless(false),
flips_vertically(false),
+ msaa_is_slow(false),
major_version(2),
minor_version(0) {}
diff --git a/gpu/command_buffer/common/capabilities.h b/gpu/command_buffer/common/capabilities.h
index d375623..b01ccb8 100644
--- a/gpu/command_buffer/common/capabilities.h
+++ b/gpu/command_buffer/common/capabilities.h
@@ -143,6 +143,7 @@ struct GPU_EXPORT Capabilities {
bool timer_queries;
bool surfaceless;
bool flips_vertically;
+ bool msaa_is_slow;
int major_version;
int minor_version;
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index dcb0046..58aa147 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -853,15 +853,7 @@ void FeatureInfo::InitializeFeatures() {
}
// Check for multisample support
-
- // crbug.com/527565 - On some GPUs, MSAA does not perform acceptably for
- // rasterization. We disable it on non-WebGL contexts. For WebGL contexts
- // we leave it up to the site to decide whether to enable MSAA.
- bool disable_all_multisample =
- workarounds_.disable_msaa_on_non_webgl_contexts && !IsWebGLContext();
-
- if (!disable_all_multisample &&
- !workarounds_.disable_chromium_framebuffer_multisample) {
+ if (!workarounds_.disable_chromium_framebuffer_multisample) {
bool ext_has_multisample =
extensions.Contains("GL_EXT_framebuffer_multisample") ||
gl_version_info_->is_es3 ||
@@ -883,8 +875,7 @@ void FeatureInfo::InitializeFeatures() {
}
}
- if (!disable_all_multisample &&
- !workarounds_.disable_multisampled_render_to_texture) {
+ if (!workarounds_.disable_multisampled_render_to_texture) {
if (extensions.Contains("GL_EXT_multisampled_render_to_texture")) {
feature_flags_.multisampled_render_to_texture = true;
} else if (extensions.Contains("GL_IMG_multisampled_render_to_texture")) {
@@ -901,9 +892,8 @@ void FeatureInfo::InitializeFeatures() {
}
}
- if (!disable_all_multisample &&
- (!gl_version_info_->is_es ||
- extensions.Contains("GL_EXT_multisample_compatibility"))) {
+ if (!gl_version_info_->is_es ||
+ extensions.Contains("GL_EXT_multisample_compatibility")) {
AddExtensionString("GL_EXT_multisample_compatibility");
feature_flags_.ext_multisample_compatibility = true;
validators_.capability.AddValue(GL_MULTISAMPLE_EXT);
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
index 63d6b5f..62c3a2e 100644
--- a/gpu/command_buffer/service/feature_info_unittest.cc
+++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -105,19 +105,6 @@ class FeatureInfoTest
info_->InitializeForTesting();
}
- void SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
- const char* extensions,
- const char* renderer,
- const char* version,
- ContextType context_type,
- const base::CommandLine& command_line) {
- GpuServiceTest::SetUpWithGLVersion(version, extensions);
- TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
- gl_.get(), extensions, renderer, version);
- info_ = new FeatureInfo(command_line);
- info_->Initialize(context_type, DisallowedFeatures());
- }
-
void SetupWithCommandLine(const base::CommandLine& command_line) {
GpuServiceTest::SetUp();
info_ = new FeatureInfo(command_line);
@@ -1423,29 +1410,5 @@ TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) {
EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422);
}
-TEST_P(FeatureInfoTest, DisableMsaaOnNonWebGLContexts) {
- base::CommandLine command_line(0, NULL);
- command_line.AppendSwitchASCII(
- switches::kGpuDriverBugWorkarounds,
- base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS));
- SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
- "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample",
- "", "", CONTEXT_TYPE_OPENGLES2, command_line);
- EXPECT_FALSE(info_->feature_flags().multisampled_render_to_texture);
- EXPECT_FALSE(info_->feature_flags().chromium_framebuffer_multisample);
-}
-
-TEST_P(FeatureInfoTest, DontDisableMsaaOnWebGLContexts) {
- base::CommandLine command_line(0, NULL);
- command_line.AppendSwitchASCII(
- switches::kGpuDriverBugWorkarounds,
- base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS));
- SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
- "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample",
- "", "", CONTEXT_TYPE_WEBGL1, command_line);
- EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture);
- EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample);
-}
-
} // namespace gles2
} // namespace gpu
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 5e1ec96..a11d2ec 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3170,6 +3170,7 @@ Capabilities GLES2DecoderImpl::GetCapabilities() {
caps.surfaceless = surfaceless_;
bool is_offscreen = !!offscreen_target_frame_buffer_.get();
caps.flips_vertically = !is_offscreen && surface_->FlipsVertically();
+ caps.msaa_is_slow = feature_info_->workarounds().msaa_is_slow;
caps.blend_equation_advanced =
feature_info_->feature_flags().blend_equation_advanced;
diff --git a/gpu/config/gpu_driver_bug_list_json.cc b/gpu/config/gpu_driver_bug_list_json.cc
index 7663fa8..9e1fbd4 100644
--- a/gpu/config/gpu_driver_bug_list_json.cc
+++ b/gpu/config/gpu_driver_bug_list_json.cc
@@ -19,7 +19,7 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST(
{
"name": "gpu driver bug list",
// Please update the version number whenever you change this file.
- "version": "8.50",
+ "version": "8.51",
"entries": [
{
"id": 1,
@@ -1557,7 +1557,7 @@ LONG_STRING_CONST(
"vendor_id": "0x8086",
"multi_gpu_category": "active",
"features": [
- "disable_msaa_on_non_webgl_contexts"
+ "msaa_is_slow"
]
},
{
diff --git a/gpu/config/gpu_driver_bug_workaround_type.h b/gpu/config/gpu_driver_bug_workaround_type.h
index b92ae69..959f780 100644
--- a/gpu/config/gpu_driver_bug_workaround_type.h
+++ b/gpu/config/gpu_driver_bug_workaround_type.h
@@ -40,8 +40,6 @@
disable_ext_draw_buffers) \
GPU_OP(DISABLE_GL_RGB_FORMAT, \
disable_gl_rgb_format) \
- GPU_OP(DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS, \
- disable_msaa_on_non_webgl_contexts) \
GPU_OP(DISABLE_MULTIMONITOR_MULTISAMPLING, \
disable_multimonitor_multisampling) \
GPU_OP(DISABLE_MULTISAMPLED_RENDER_TO_TEXTURE, \
@@ -102,6 +100,8 @@
max_varying_vectors_16) \
GPU_OP(MAX_VERTEX_UNIFORM_VECTORS_256, \
max_vertex_uniform_vectors_256) \
+ GPU_OP(MSAA_IS_SLOW, \
+ msaa_is_slow) \
GPU_OP(NEEDS_GLSL_BUILT_IN_FUNCTION_EMULATION, \
needs_glsl_built_in_function_emulation) \
GPU_OP(NEEDS_OFFSCREEN_BUFFER_WORKAROUND, \