diff options
author | ericrk <ericrk@chromium.org> | 2015-10-01 15:18:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-01 22:20:02 +0000 |
commit | ed27437d3a0a58534dd6cb877b18d2d60d1d21fe (patch) | |
tree | 39b572acf61de1d3dcda428603a8dc865c1b4f9b | |
parent | 58ceda20a5582479d58d884a7b99b58064385b3f (diff) | |
download | chromium_src-ed27437d3a0a58534dd6cb877b18d2d60d1d21fe.zip chromium_src-ed27437d3a0a58534dd6cb877b18d2d60d1d21fe.tar.gz chromium_src-ed27437d3a0a58534dd6cb877b18d2d60d1d21fe.tar.bz2 |
Blacklist MSAA for GPU Raster on Intel GPUs
Intel GPUs have unacceptable performance for GPU raster when MSAA is
enabled. This has been tested on recent Intel GPUs on CrOS, Mac, and
Windows. Given this we’re adding a workaround for Intel GPUs which will
disable MSAA for GPU raster.
We don’t want to impact WebGL, so this workaround specifically targets
non-WebGL contexts.
I’ve updated FeatureInfo’s Initialize function to accept the context
type, which allows us to customize features based on webgl/non-webgl.
I’ve also changed the secondary version of Initialize, which takes no
arguments, to be InitializeForTesting, as this function is only called
in tests.
BUG=527565
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1374043005
Cr-Commit-Position: refs/heads/master@{#351904}
-rw-r--r-- | gpu/command_buffer/service/buffer_manager_unittest.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/service/context_group.cc | 26 | ||||
-rw-r--r-- | gpu/command_buffer/service/context_group.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/service/feature_info.cc | 43 | ||||
-rw-r--r-- | gpu/command_buffer/service/feature_info.h | 13 | ||||
-rw-r--r-- | gpu/command_buffer/service/feature_info_unittest.cc | 43 | ||||
-rw-r--r-- | gpu/command_buffer/service/framebuffer_manager_unittest.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 30 | ||||
-rw-r--r-- | gpu/command_buffer/service/query_manager_unittest.cc | 10 | ||||
-rw-r--r-- | gpu/command_buffer/service/renderbuffer_manager_unittest.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/service/texture_manager_unittest.cc | 20 | ||||
-rw-r--r-- | gpu/command_buffer/tests/gl_unittest.cc | 2 | ||||
-rw-r--r-- | gpu/config/gpu_driver_bug_list_json.cc | 12 | ||||
-rw-r--r-- | gpu/config/gpu_driver_bug_workaround_type.h | 2 |
14 files changed, 141 insertions, 70 deletions
diff --git a/gpu/command_buffer/service/buffer_manager_unittest.cc b/gpu/command_buffer/service/buffer_manager_unittest.cc index c537c2f..91003a0 100644 --- a/gpu/command_buffer/service/buffer_manager_unittest.cc +++ b/gpu/command_buffer/service/buffer_manager_unittest.cc @@ -27,7 +27,7 @@ class BufferManagerTestBase : public GpuServiceTest { GpuServiceTest::SetUp(); if (feature_info) { TestHelper::SetupFeatureInfoInitExpectations(gl_.get(), extensions); - feature_info->Initialize(); + feature_info->InitializeForTesting(); } error_state_.reset(new MockErrorState()); manager_.reset(new BufferManager(memory_tracker, feature_info)); diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index e5b4974..e22459a 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -36,8 +36,7 @@ ContextGroup::ContextGroup( const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, bool bind_generates_resource) - : context_type_(CONTEXT_TYPE_OPENGLES2), - mailbox_manager_(mailbox_manager), + : mailbox_manager_(mailbox_manager), memory_tracker_(memory_tracker), shader_translator_cache_(shader_translator_cache), #if defined(OS_MACOSX) @@ -92,21 +91,18 @@ static void GetIntegerv(GLenum pname, uint32* var) { bool ContextGroup::Initialize(GLES2Decoder* decoder, ContextType context_type, const DisallowedFeatures& disallowed_features) { - if (!HaveContexts()) { - context_type_ = context_type; - } else if (context_type_ != context_type) { - LOG(ERROR) << "ContextGroup::Initialize failed because the type of " - << "the context does not fit with the group."; - return false; - } - - // If we've already initialized the group just add the context. if (HaveContexts()) { + if (context_type != feature_info_->context_type()) { + LOG(ERROR) << "ContextGroup::Initialize failed because the type of " + << "the context does not fit with the group."; + return false; + } + // If we've already initialized the group just add the context. decoders_.push_back(base::AsWeakPtr<GLES2Decoder>(decoder)); return true; } - if (!feature_info_->Initialize(disallowed_features)) { + if (!feature_info_->Initialize(context_type, disallowed_features)) { LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo " << "initialization failed."; return false; @@ -146,9 +142,9 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder, buffer_manager_.reset( new BufferManager(memory_tracker_.get(), feature_info_.get())); - framebuffer_manager_.reset( - new FramebufferManager(max_draw_buffers_, max_color_attachments_, - context_type, framebuffer_completeness_cache_)); + framebuffer_manager_.reset(new FramebufferManager( + max_draw_buffers_, max_color_attachments_, feature_info_->context_type(), + framebuffer_completeness_cache_)); renderbuffer_manager_.reset(new RenderbufferManager( memory_tracker_.get(), max_renderbuffer_size, max_samples, feature_info_.get())); diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h index dce75c6..ad2c5df 100644 --- a/gpu/command_buffer/service/context_group.h +++ b/gpu/command_buffer/service/context_group.h @@ -251,8 +251,6 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); bool HaveContexts(); - ContextType context_type_; - scoped_refptr<MailboxManager> mailbox_manager_; scoped_refptr<MemoryTracker> memory_tracker_; scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; @@ -308,5 +306,3 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ - - diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index c21815c..ea162a6 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -231,20 +231,23 @@ void FeatureInfo::InitializeBasicState(const base::CommandLine* command_line) { command_line->HasSwitch(switches::kDisableGLSLTranslator); unsafe_es3_apis_enabled_ = false; -} -bool FeatureInfo::Initialize() { - disallowed_features_ = DisallowedFeatures(); - InitializeFeatures(); - return true; + // Default context_type_ to a GLES2 Context. + context_type_ = CONTEXT_TYPE_OPENGLES2; } -bool FeatureInfo::Initialize(const DisallowedFeatures& disallowed_features) { +bool FeatureInfo::Initialize(ContextType context_type, + const DisallowedFeatures& disallowed_features) { disallowed_features_ = disallowed_features; + context_type_ = context_type; InitializeFeatures(); return true; } +bool FeatureInfo::InitializeForTesting() { + return Initialize(CONTEXT_TYPE_OPENGLES2, DisallowedFeatures()); +} + bool IsGL_REDSupportedOnFBOs() { // Skia uses GL_RED with frame buffers, unfortunately, Mesa claims to support // GL_EXT_texture_rg, but it doesn't support it on frame buffers. To fix @@ -698,7 +701,15 @@ void FeatureInfo::InitializeFeatures() { } // Check for multisample support - if (!workarounds_.disable_chromium_framebuffer_multisample) { + + // 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) { bool ext_has_multisample = extensions.Contains("GL_EXT_framebuffer_multisample") || gl_version_info_->is_es3 || @@ -720,7 +731,8 @@ void FeatureInfo::InitializeFeatures() { } } - if (!workarounds_.disable_multisampled_render_to_texture) { + if (!disable_all_multisample && + !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")) { @@ -1193,6 +1205,21 @@ void FeatureInfo::EnableES3Validators() { unsafe_es3_apis_enabled_ = true; } +bool FeatureInfo::IsWebGLContext() const { + // Switch statement to cause a compile-time error if we miss a case. + switch (context_type_) { + case CONTEXT_TYPE_WEBGL1: + case CONTEXT_TYPE_WEBGL2: + return true; + case CONTEXT_TYPE_OPENGLES2: + case CONTEXT_TYPE_OPENGLES3: + return false; + } + + NOTREACHED(); + return false; +} + void FeatureInfo::AddExtensionString(const char* s) { std::string str(s); size_t pos = extensions_.find(str); diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h index 0f3f709..0043463 100644 --- a/gpu/command_buffer/service/feature_info.h +++ b/gpu/command_buffer/service/feature_info.h @@ -110,13 +110,18 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { FeatureInfo(const base::CommandLine& command_line); // Initializes the feature information. Needs a current GL context. - bool Initialize(); - bool Initialize(const DisallowedFeatures& disallowed_features); + bool Initialize(ContextType context_type, + const DisallowedFeatures& disallowed_features); + + // Helper that defaults to no disallowed features and a GLES2 context. + bool InitializeForTesting(); const Validators* validators() const { return &validators_; } + ContextType context_type() const { return context_type_; } + const std::string& extensions() const { return extensions_; } @@ -148,6 +153,8 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { workarounds_.use_virtualized_gl_contexts; } + bool IsWebGLContext() const; + private: friend class base::RefCounted<FeatureInfo>; friend class BufferManagerClientSideArraysTest; @@ -162,6 +169,8 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { DisallowedFeatures disallowed_features_; + ContextType context_type_; + // The extensions string returned by glGetString(GL_EXTENSIONS); std::string extensions_; diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index 47a19998..bb616ac 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc @@ -76,7 +76,7 @@ class FeatureInfoTest TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( gl_.get(), extensions, renderer, version); info_ = new FeatureInfo(); - info_->Initialize(); + info_->InitializeForTesting(); } void SetupInitExpectationsWithGLVersionAndCommandLine( @@ -88,7 +88,20 @@ class FeatureInfoTest TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( gl_.get(), extensions, renderer, version); info_ = new FeatureInfo(command_line); - info_->Initialize(); + 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) { @@ -103,7 +116,7 @@ class FeatureInfoTest TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( gl_.get(), extensions, "", ""); info_ = new FeatureInfo(command_line); - info_->Initialize(); + info_->InitializeForTesting(); } void SetupWithoutInit() { @@ -1369,5 +1382,29 @@ 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/framebuffer_manager_unittest.cc b/gpu/command_buffer/service/framebuffer_manager_unittest.cc index 3a8511d..e5f8f18 100644 --- a/gpu/command_buffer/service/framebuffer_manager_unittest.cc +++ b/gpu/command_buffer/service/framebuffer_manager_unittest.cc @@ -143,7 +143,7 @@ class FramebufferInfoTestBase : public GpuServiceTest { GpuServiceTest::SetUpWithGLVersion(gl_version, extensions); TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(gl_.get(), extensions, "", gl_version); - feature_info_->Initialize(); + feature_info_->InitializeForTesting(); manager_.CreateFramebuffer(kClient1Id, kService1Id); error_state_.reset(new ::testing::StrictMock<gles2::MockErrorState>()); framebuffer_ = manager_.GetFramebuffer(kClient1Id); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 8574d5f..96562c8 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -841,11 +841,6 @@ class GLES2DecoderImpl : public GLES2Decoder, return true; } - bool IsWebGLContext() const { - return context_type_ == CONTEXT_TYPE_WEBGL1 || - context_type_ == CONTEXT_TYPE_WEBGL2; - } - bool IsOffscreenBufferMultisampled() const { return offscreen_target_samples_ > 1; } @@ -2623,8 +2618,6 @@ bool GLES2DecoderImpl::Initialize( if (!attrib_parser.Parse(attribs)) return false; - context_type_ = attrib_parser.context_type; - surfaceless_ = surface->IsSurfaceless() && !offscreen; set_initialized(); @@ -2674,18 +2667,19 @@ bool GLES2DecoderImpl::Initialize( } disallowed_features_ = disallowed_features; - if (context_type_ == CONTEXT_TYPE_WEBGL1) { + if (attrib_parser.context_type == CONTEXT_TYPE_WEBGL1) { disallowed_features_.npot_support = true; } - if (!group_->Initialize(this, context_type_, disallowed_features_)) { + if (!group_->Initialize(this, attrib_parser.context_type, + disallowed_features_)) { group_ = NULL; // Must not destroy ContextGroup if it is not initialized. Destroy(true); return false; } CHECK_GL_ERROR(); - if (context_type_ == CONTEXT_TYPE_WEBGL2 || - context_type_ == CONTEXT_TYPE_OPENGLES3) { + if (feature_info_->context_type() == CONTEXT_TYPE_WEBGL2 || + feature_info_->context_type() == CONTEXT_TYPE_OPENGLES3) { if (!feature_info_->IsES3Capable()) { LOG(ERROR) << "Underlying driver does not support ES3."; Destroy(true); @@ -3226,7 +3220,7 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() { resources.FragmentPrecisionHigh = PrecisionMeetsSpecForHighpFloat(range[0], range[1], precision); - if (IsWebGLContext()) { + if (feature_info_->IsWebGLContext()) { resources.OES_standard_derivatives = derivatives_explicitly_enabled_; resources.EXT_frag_depth = frag_depth_explicitly_enabled_; resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_; @@ -3253,7 +3247,7 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() { } ShShaderSpec shader_spec; - switch (context_type_) { + switch (feature_info_->context_type()) { case CONTEXT_TYPE_WEBGL1: shader_spec = SH_WEBGL_SPEC; break; @@ -9006,7 +9000,7 @@ error::Error GLES2DecoderImpl::HandleReadPixels(uint32 immediate_data_size, } break; } - if (!IsWebGLContext()) { + if (!feature_info_->IsWebGLContext()) { accepted_formats.push_back(GL_BGRA_EXT); accepted_types.push_back(GL_UNSIGNED_BYTE); } @@ -9507,7 +9501,7 @@ error::Error GLES2DecoderImpl::HandleGetString(uint32 immediate_data_size, case GL_VENDOR: // Return the unmasked VENDOR/RENDERER string for WebGL contexts. // They are used by WEBGL_debug_renderer_info. - if (!IsWebGLContext()) + if (!feature_info_->IsWebGLContext()) str = "Chromium"; else str = reinterpret_cast<const char*>(glGetString(name)); @@ -9516,7 +9510,7 @@ error::Error GLES2DecoderImpl::HandleGetString(uint32 immediate_data_size, { // For WebGL contexts, strip out the OES derivatives and // EXT frag depth extensions if they have not been enabled. - if (IsWebGLContext()) { + if (feature_info_->IsWebGLContext()) { extensions = feature_info_->extensions(); if (!derivatives_explicitly_enabled_) { size_t offset = extensions.find(kOESDerivativeExtension); @@ -11963,7 +11957,7 @@ error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM( cmd_data); Bucket* bucket = CreateBucket(c.bucket_id); scoped_refptr<FeatureInfo> info(new FeatureInfo()); - info->Initialize(disallowed_features_); + info->Initialize(feature_info_->context_type(), disallowed_features_); bucket->SetFromString(info->extensions().c_str()); return error::kNoError; } @@ -11986,7 +11980,7 @@ error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM( bool desire_frag_depth = false; bool desire_draw_buffers = false; bool desire_shader_texture_lod = false; - if (IsWebGLContext()) { + if (feature_info_->IsWebGLContext()) { desire_standard_derivatives = feature_str.find("GL_OES_standard_derivatives") != std::string::npos; desire_frag_depth = diff --git a/gpu/command_buffer/service/query_manager_unittest.cc b/gpu/command_buffer/service/query_manager_unittest.cc index 576aa35..621cd6f 100644 --- a/gpu/command_buffer/service/query_manager_unittest.cc +++ b/gpu/command_buffer/service/query_manager_unittest.cc @@ -66,7 +66,7 @@ class QueryManagerTest : public GpuServiceTest { EXPECT_CALL(*decoder_.get(), GetGLContext()) .WillRepeatedly(Return(GetGLContext())); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); manager_.reset(new QueryManager(decoder_.get(), feature_info.get())); } @@ -504,7 +504,7 @@ TEST_F(QueryManagerTest, ARBOcclusionQuery2) { gl_.get(), "GL_ARB_occlusion_query2"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); scoped_ptr<QueryManager> manager( new QueryManager(decoder_.get(), feature_info.get())); @@ -538,7 +538,7 @@ TEST_F(QueryManagerTest, ARBOcclusionQuery) { gl_.get(), "GL_ARB_occlusion_query"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); scoped_ptr<QueryManager> manager( new QueryManager(decoder_.get(), feature_info.get())); @@ -571,7 +571,7 @@ TEST_F(QueryManagerTest, ARBOcclusionPauseResume) { gl_.get(), "GL_ARB_occlusion_query"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); scoped_ptr<QueryManager> manager( new QueryManager(decoder_.get(), feature_info.get())); @@ -914,7 +914,7 @@ TEST_F(QueryManagerTest, GetErrorQuery) { TestHelper::SetupFeatureInfoInitExpectations(gl_.get(), ""); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); scoped_ptr<QueryManager> manager( new QueryManager(decoder_.get(), feature_info.get())); diff --git a/gpu/command_buffer/service/renderbuffer_manager_unittest.cc b/gpu/command_buffer/service/renderbuffer_manager_unittest.cc index 7633f68..9957203 100644 --- a/gpu/command_buffer/service/renderbuffer_manager_unittest.cc +++ b/gpu/command_buffer/service/renderbuffer_manager_unittest.cc @@ -35,7 +35,7 @@ class RenderbufferManagerTestBase : public GpuServiceTest { depth24_supported ? "GL_OES_depth24" : "", "", use_gles ? "OpenGL ES 2.0" : "OpenGL 2.1"); - feature_info_->Initialize(); + feature_info_->InitializeForTesting(); manager_.reset(new RenderbufferManager( memory_tracker, kMaxSize, kMaxSamples, feature_info_.get())); } diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc index 1d882d9..262faab 100644 --- a/gpu/command_buffer/service/texture_manager_unittest.cc +++ b/gpu/command_buffer/service/texture_manager_unittest.cc @@ -101,7 +101,7 @@ class TextureManagerTest : public GpuServiceTest { bool enable_es3) { TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( gl_.get(), gl_extensions, "", gl_version); - feature_info_->Initialize(); + feature_info_->InitializeForTesting(); if (enable_es3) { EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) .WillOnce(SetArgPointee<1>(8)) @@ -444,7 +444,7 @@ TEST_F(TextureManagerTest, ValidForTargetNPOT) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_npot"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, @@ -486,7 +486,7 @@ class TextureTestBase : public GpuServiceTest { if (!extensions.empty()) { TestHelper::SetupFeatureInfoInitExpectations(gl_.get(), extensions.c_str()); - feature_info_->Initialize(); + feature_info_->InitializeForTesting(); } manager_.reset(new TextureManager(memory_tracker, @@ -779,7 +779,7 @@ TEST_F(TextureTest, NPOT2DNPOTOK) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_npot"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, @@ -1049,7 +1049,7 @@ TEST_F(TextureTest, FloatNotLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_float"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, @@ -1081,7 +1081,7 @@ TEST_F(TextureTest, FloatLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_float GL_OES_texture_float_linear"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, @@ -1105,7 +1105,7 @@ TEST_F(TextureTest, HalfFloatNotLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_half_float"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, @@ -1137,7 +1137,7 @@ TEST_F(TextureTest, HalfFloatLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_half_float GL_OES_texture_half_float_linear"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, @@ -1161,7 +1161,7 @@ TEST_F(TextureTest, EGLImageExternal) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_EGL_image_external"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, @@ -1183,7 +1183,7 @@ TEST_F(TextureTest, DepthTexture) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_ANGLE_depth_texture"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(); + feature_info->InitializeForTesting(); TextureManager manager(NULL, feature_info.get(), kMaxTextureSize, diff --git a/gpu/command_buffer/tests/gl_unittest.cc b/gpu/command_buffer/tests/gl_unittest.cc index 165d3b1..70d35df 100644 --- a/gpu/command_buffer/tests/gl_unittest.cc +++ b/gpu/command_buffer/tests/gl_unittest.cc @@ -91,7 +91,7 @@ TEST_F(GLTest, SimpleShader) { TEST_F(GLTest, FeatureFlagsMatchCapabilities) { scoped_refptr<gles2::FeatureInfo> features = new gles2::FeatureInfo; - EXPECT_TRUE(features->Initialize()); + EXPECT_TRUE(features->InitializeForTesting()); const auto& caps = gl_.GetCapabilities(); const auto& flags = features->feature_flags(); EXPECT_EQ(caps.egl_image_external, flags.oes_egl_image_external); diff --git a/gpu/config/gpu_driver_bug_list_json.cc b/gpu/config/gpu_driver_bug_list_json.cc index 6900917..6519e39 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.25", + "version": "8.26", "entries": [ { "id": 1, @@ -1543,6 +1543,16 @@ LONG_STRING_CONST( "features": [ "disable_texture_storage" ] + }, + { + "id": 132, + "description": "On Intel GPUs MSAA performance is not acceptable for GPU rasterization", + "cr_bugs": [527565], + "vendor_id": "0x8086", + "multi_gpu_category": "active", + "features": [ + "disable_msaa_on_non_webgl_contexts" + ] } ] } diff --git a/gpu/config/gpu_driver_bug_workaround_type.h b/gpu/config/gpu_driver_bug_workaround_type.h index 0f90743..eb2877f 100644 --- a/gpu/config/gpu_driver_bug_workaround_type.h +++ b/gpu/config/gpu_driver_bug_workaround_type.h @@ -38,6 +38,8 @@ disable_gl_path_rendering) \ 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, \ |