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

Issue 1916303003: Report lost context from GLES2Implementation based on share group state. (Closed)

Created:
4 years, 8 months ago by danakj
Modified:
4 years, 7 months ago
CC:
chromium-reviews, rjkroege, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, piman+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org, dcheng, Ken Russell (switch to Gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Report lost context from GLES2Implementation based on share group state. When any context in a gles2::ShareGroup becomes lost, all contexts in the same group should report that they are lost immediately. This avoids races such as the following: IPC thread hears of the loss of Context 1 and 2. IPC thread posts to thread B for Context 1. Context 1 hears it is lost on thread B. Posts to thread A to recreate. IPC thread posts to thread A for Context 2. Context 1 is recreated on thread A. Puts itself in same share group as 2. Context 2 hears it is lost on thread A, makes a new share group. This can lead to racey cases where share groups get split apart. Resolve this by storing a |lost_| state on gles2::ShareGroup. When GLES2Implementation hears of OnGpuControlLostContext, it will set the lost state on the ShareGroup. Now glGetGraphicsResetStatusKHR() will return an error if the gles2::ShareGroup has been lost. We remove the GpuControl::IsChannelLost() method as this is now unused. The CmdBufferHelper::IsContextLost() is still needed for the QueryTracker, so insert a comment and a TODO explaining why and how it could be removed. R=piman, sievers BUG=584497 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/b1f17d6f3f988d7b190cab1147b1e20da0647a44 Cr-Commit-Position: refs/heads/master@{#389947} Committed: https://crrev.com/90fcc5eaa0a57e02c8be5f97eff8c1f29cad8a76 Cr-Commit-Position: refs/heads/master@{#390591}

Patch Set 1 #

Patch Set 2 : lost-share-group: init #

Patch Set 3 : lost-share-group: rm-cc-test #

Patch Set 4 : lost-share-group: rebase #

Patch Set 5 : lost-share-group: update-gles2-impl-on-error-state-change #

Total comments: 2

Patch Set 6 : lost-share-group: testcompile #

Patch Set 7 : lost-share-group: disconnect-channel #

Unified diffs Side-by-side diffs Delta from patch set Stats (+219 lines, -220 lines) Patch
M cc/output/gl_renderer_unittest.cc View 1 2 3 2 chunks +0 lines, -84 lines 0 comments Download
M cc/output/program_binding.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/mus/gles2/command_buffer_local.h View 1 chunk +0 lines, -1 line 0 comments Download
M components/mus/gles2/command_buffer_local.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_video_encoder_host.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/pepper_video_encoder_host.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/client_test_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 4 chunks +14 lines, -18 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 2 3 4 5 3 chunks +30 lines, -4 lines 0 comments Download
M gpu/command_buffer/client/gpu_control.h View 1 chunk +0 lines, -4 lines 0 comments Download
M gpu/command_buffer/client/gpu_control_client.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/query_tracker.cc View 1 chunk +11 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/share_group.h View 1 3 chunks +12 lines, -1 line 0 comments Download
M gpu/command_buffer/client/share_group.cc View 1 chunk +11 lines, -1 line 0 comments Download
M gpu/command_buffer/common/constants.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.h View 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.h View 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M gpu/gles2_conform_support/egl/display.h View 1 chunk +0 lines, -1 line 0 comments Download
M gpu/gles2_conform_support/egl/display.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.h View 1 2 3 4 5 6 3 chunks +25 lines, -11 lines 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.cc View 1 2 3 4 5 6 11 chunks +94 lines, -50 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.h View 1 chunk +0 lines, -1 line 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.cc View 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 51 (23 generated)
danakj
4 years, 8 months ago (2016-04-26 01:21:36 UTC) #2
danakj
+sky for mojo +fsamuel for mus
4 years, 8 months ago (2016-04-26 01:21:56 UTC) #4
piman
lgtm
4 years, 8 months ago (2016-04-26 01:58:47 UTC) #6
Fady Samuel
mus lgtm
4 years, 8 months ago (2016-04-26 02:54:51 UTC) #8
sky
LGTM
4 years, 8 months ago (2016-04-26 16:29:37 UTC) #9
danakj
I think the bot failures are me forgetting to init lost_ = false in the ...
4 years, 8 months ago (2016-04-26 19:02:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916303003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916303003/20001
4 years, 8 months ago (2016-04-26 19:03:52 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/152171)
4 years, 8 months ago (2016-04-26 19:54:02 UTC) #15
danakj
The cc unittest failure is GLRendererTestSyncPoint.SignalSyncPointOnLostContext: The test does: 1. LoseContextCHROMIUM() 2. SignalSyncToken() 3. Finish() ...
4 years, 8 months ago (2016-04-26 21:18:49 UTC) #16
danakj
I'm feeling kinda skeptical of this test: - It's in cc_unittests but testing implementation details ...
4 years, 8 months ago (2016-04-26 21:28:05 UTC) #17
piman
On Tue, Apr 26, 2016 at 2:28 PM, <danakj@chromium.org> wrote: > I'm feeling kinda skeptical ...
4 years, 8 months ago (2016-04-26 21:49:45 UTC) #18
danakj
OK Ill kill the cc unit test and send another CL for a test in ...
4 years, 8 months ago (2016-04-26 22:31:30 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916303003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916303003/40001
4 years, 8 months ago (2016-04-26 22:32:23 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-27 00:01:03 UTC) #24
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/b1f17d6f3f988d7b190cab1147b1e20da0647a44 Cr-Commit-Position: refs/heads/master@{#389947}
4 years, 8 months ago (2016-04-27 00:02:19 UTC) #26
Matt Giuca
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/1919203003/ by mgiuca@chromium.org. ...
4 years, 8 months ago (2016-04-27 03:32:10 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916303003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916303003/80001
4 years, 7 months ago (2016-04-29 01:00:27 UTC) #30
danakj
Patch set 4 will notify the GLES2Implementation of context loss whenever the command buffer state ...
4 years, 7 months ago (2016-04-29 01:06:10 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916303003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916303003/120001
4 years, 7 months ago (2016-04-29 01:06:24 UTC) #35
danakj
On 2016/04/29 01:06:10, danakj wrote: > Patch set 4 will notify the GLES2Implementation of context ...
4 years, 7 months ago (2016-04-29 01:06:50 UTC) #36
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/58459)
4 years, 7 months ago (2016-04-29 01:21:08 UTC) #38
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916303003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916303003/140001
4 years, 7 months ago (2016-04-29 01:34:49 UTC) #40
piman
LGTM+naming nit https://codereview.chromium.org/1916303003/diff/120001/gpu/ipc/client/command_buffer_proxy_impl.h File gpu/ipc/client/command_buffer_proxy_impl.h (right): https://codereview.chromium.org/1916303003/diff/120001/gpu/ipc/client/command_buffer_proxy_impl.h#newcode208 gpu/ipc/client/command_buffer_proxy_impl.h:208: void DestroyChannel(); nit: we don't really destroy ...
4 years, 7 months ago (2016-04-29 01:35:28 UTC) #41
danakj
In patch set 8 I used RAII objects to CheckLock() and either verify no error ...
4 years, 7 months ago (2016-04-29 02:34:41 UTC) #42
piman
Let's go with PS7. Thanks for investigating!
4 years, 7 months ago (2016-04-29 02:39:38 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916303003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916303003/160001
4 years, 7 months ago (2016-04-29 02:40:18 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:160001)
4 years, 7 months ago (2016-04-29 04:21:12 UTC) #49
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:24:17 UTC) #50
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/90fcc5eaa0a57e02c8be5f97eff8c1f29cad8a76
Cr-Commit-Position: refs/heads/master@{#390591}

Powered by Google App Engine
This is Rietveld 408576698