diff options
author | sievers <sievers@chromium.org> | 2015-06-05 10:08:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-05 17:08:43 +0000 |
commit | 759299794cf4b9ba4b783cf1c5d996dc3d7f215b (patch) | |
tree | 49b75c5969f6b0a8273fe2b8cdcdea45181afd70 /gpu | |
parent | a2eca7bf2921ad7b1f4223c1cdea24d57abd8eba (diff) | |
download | chromium_src-759299794cf4b9ba4b783cf1c5d996dc3d7f215b.zip chromium_src-759299794cf4b9ba4b783cf1c5d996dc3d7f215b.tar.gz chromium_src-759299794cf4b9ba4b783cf1c5d996dc3d7f215b.tar.bz2 |
Android: Enable 'crash GPU process on context lost' WAR for Mali-400
BUG=496438
NOTRY=True
Review URL: https://codereview.chromium.org/1149233004
Cr-Commit-Position: refs/heads/master@{#333076}
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 19 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder_mock.h | 1 | ||||
-rw-r--r-- | gpu/config/gpu_driver_bug_list_json.cc | 15 |
4 files changed, 32 insertions, 7 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 717c635..a14f72e 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -685,6 +685,7 @@ class GLES2DecoderImpl : public GLES2Decoder, void SetAsyncPixelTransferManagerForTest( AsyncPixelTransferManager* manager) override; void SetIgnoreCachedStateForTest(bool ignore) override; + void SetAllowExit(bool allow_exit) override; void ProcessFinishedAsyncTransfers(); bool GetServiceTextureId(uint32 client_texture_id, @@ -1997,6 +1998,8 @@ class GLES2DecoderImpl : public GLES2Decoder, GLuint validation_fbo_multisample_; GLuint validation_fbo_; + bool allow_exit_; + typedef gpu::gles2::GLES2Decoder::Error (GLES2DecoderImpl::*CmdHandler)( uint32 immediate_data_size, const void* data); @@ -2509,7 +2512,8 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) gpu_debug_commands_(false), validation_texture_(0), validation_fbo_multisample_(0), - validation_fbo_(0) { + validation_fbo_(0), + allow_exit_(false) { DCHECK(group); // The shader translator is used for WebGL even when running on EGL @@ -4494,6 +4498,10 @@ void GLES2DecoderImpl::SetIgnoreCachedStateForTest(bool ignore) { state_.SetIgnoreCachedStateForTest(ignore); } +void GLES2DecoderImpl::SetAllowExit(bool allow_exit) { + allow_exit_ = allow_exit; +} + void GLES2DecoderImpl::OnFboChanged() const { if (workarounds().restore_scissor_on_fbo_change) state_.fbo_binding_for_scissor_workaround_dirty = true; @@ -11326,11 +11334,10 @@ void GLES2DecoderImpl::MarkContextLost(error::ContextLostReason reason) { current_decoder_error_ = error::kLostContext; context_was_lost_ = true; - // Some D3D drivers cannot recover from device lost in the GPU process - // sandbox. Allow a new GPU process to launch. - if (workarounds().exit_on_context_lost) { - LOG(ERROR) << "Exiting GPU process because some drivers cannot reset" - << " a D3D device in the Chrome GPU process sandbox."; + // Work around issues with recovery by allowing a new GPU process to launch. + if (workarounds().exit_on_context_lost && allow_exit_) { + LOG(ERROR) << "Exiting GPU process because some drivers cannot recover" + << " from problems."; #if defined(OS_WIN) base::win::SetShouldCrashOnProcessDetach(false); #endif diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h index ac01c95..3fc8623 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder.h @@ -171,6 +171,10 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; + // Allow the decoder to exit the current process. + // Defaults to |false|. + virtual void SetAllowExit(bool allow_exit) = 0; + // Gets the QueryManager for this context. virtual QueryManager* GetQueryManager() = 0; diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h index 65df53c..1e5357d 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h @@ -89,6 +89,7 @@ class MockGLES2Decoder : public GLES2Decoder { MOCK_METHOD1(SetAsyncPixelTransferManagerForTest, void(AsyncPixelTransferManager*)); MOCK_METHOD1(SetIgnoreCachedStateForTest, void(bool ignore)); + MOCK_METHOD1(SetAllowExit, void(bool allow)); MOCK_METHOD3(DoCommand, error::Error(unsigned int command, unsigned int arg_count, const void* cmd_data)); diff --git a/gpu/config/gpu_driver_bug_list_json.cc b/gpu/config/gpu_driver_bug_list_json.cc index 3373968..191cca9 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.09", + "version": "8.10", "entries": [ { "id": 1, @@ -1411,6 +1411,19 @@ LONG_STRING_CONST( "features": [ "remove_pow_with_constant_exponent" ] + }, + { + "id": 119, + "description": "Context lost recovery often fails on Mali-400 on Android.", + "cr_bugs": [496438], + "os": { + "type": "android" + }, + "gl_vendor": "ARM.*", + "gl_renderer": ".*Mali-400.*", + "features": [ + "exit_on_context_lost" + ] } ] } |