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

Issue 13746002: Force GPU switch with CGLSetVirtualScreen only for compositor (Closed)

Created:
7 years, 8 months ago by ccameron
Modified:
7 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Visibility:
Public.

Description

Force GPU switch with CGLSetVirtualScreen only for compositor Only compositor contexts are known to use only the subset of GL that can be safely migrated between the iGPU and the dGPU. Mark those contexts as safe to forcibly transition between the GPUs. In particular, Intel GPUs support using a GL_STENCIL_INDEX8 attachment with no depth buffer, but NV GPUs don't. Skia will use this FBO combo if it is listed as available. If we use this combo on the iGPU and then forcibly transition the GL context using this combo from the iGPU to the dGPU, corruption occurs on NV, and a hang happens on AMD. Further, if we cache complete FBO combos, then we will cache this combo as valid when using the iGPU, and claim that it's valid when using the dGPU, resulting in GL errors. BUG=180876 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193302

Patch Set 1 #

Total comments: 8

Patch Set 2 : Incorporate reiew feedback #

Total comments: 5

Patch Set 3 : Fix bug id #

Patch Set 4 : Fix alphabetization (L, M, N, O...) #

Patch Set 5 : Only transition compositor contexts #

Total comments: 10

Patch Set 6 : Incorporate review feedback #

Patch Set 7 : Incorporate review feedback #

Patch Set 8 : Add TODO #

Patch Set 9 : Set upstream correctly #

Patch Set 10 : Clean up branching mess #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -42 lines) Patch
M gpu/command_buffer/service/framebuffer_manager.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/framebuffer_manager.cc View 1 2 3 4 9 2 chunks +33 lines, -16 lines 0 comments Download
M gpu/command_buffer/service/framebuffer_manager_unittest.cc View 1 2 3 4 5 6 7 8 6 chunks +30 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gl_context_virtual.h View 1 2 3 4 5 9 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gl_context_virtual.cc View 1 2 3 4 5 6 7 9 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M ui/gl/gl_context.h View 1 2 3 4 9 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gl/gl_context.cc View 1 2 3 4 9 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gl/gl_context_cgl.h View 1 2 3 4 9 2 chunks +2 lines, -0 lines 0 comments Download
M ui/gl/gl_context_cgl.cc View 1 2 3 4 5 9 3 chunks +37 lines, -26 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
ccameron
This was causing AMD-based Macbook Pros to hang in the driver -- only make the ...
7 years, 8 months ago (2013-04-06 01:42:12 UTC) #1
jbauman
https://codereview.chromium.org/13746002/diff/1/content/browser/gpu/gpu_driver_bug_list.json File content/browser/gpu/gpu_driver_bug_list.json (right): https://codereview.chromium.org/13746002/diff/1/content/browser/gpu/gpu_driver_bug_list.json#newcode61 content/browser/gpu/gpu_driver_bug_list.json:61: // "use_current_program_after_successful_link". Add the new value to this list. ...
7 years, 8 months ago (2013-04-06 01:52:02 UTC) #2
ccameron
Thanks!! https://codereview.chromium.org/13746002/diff/1/content/browser/gpu/gpu_driver_bug_list.json File content/browser/gpu/gpu_driver_bug_list.json (right): https://codereview.chromium.org/13746002/diff/1/content/browser/gpu/gpu_driver_bug_list.json#newcode61 content/browser/gpu/gpu_driver_bug_list.json:61: // "use_current_program_after_successful_link". On 2013/04/06 01:52:02, jbauman wrote: > ...
7 years, 8 months ago (2013-04-08 17:25:13 UTC) #3
greggman
Hey Mo, Can you comment on what the id means in the driver bug list? ...
7 years, 8 months ago (2013-04-08 17:35:25 UTC) #4
greggman
Let's try that again with mo in the list. He Mo, can you common on ...
7 years, 8 months ago (2013-04-08 17:36:12 UTC) #5
ccameron
Thanks! https://codereview.chromium.org/13746002/diff/7001/content/browser/gpu/gpu_driver_bug_list.json File content/browser/gpu/gpu_driver_bug_list.json (right): https://codereview.chromium.org/13746002/diff/7001/content/browser/gpu/gpu_driver_bug_list.json#newcode324 content/browser/gpu/gpu_driver_bug_list.json:324: "id": 18, On 2013/04/08 17:35:26, greggman wrote: > ...
7 years, 8 months ago (2013-04-08 17:44:46 UTC) #6
Zhenyao Mo
https://codereview.chromium.org/13746002/diff/7001/content/browser/gpu/gpu_driver_bug_list.json File content/browser/gpu/gpu_driver_bug_list.json (right): https://codereview.chromium.org/13746002/diff/7001/content/browser/gpu/gpu_driver_bug_list.json#newcode324 content/browser/gpu/gpu_driver_bug_list.json:324: "id": 18, On 2013/04/08 17:35:26, greggman wrote: > I ...
7 years, 8 months ago (2013-04-08 17:46:16 UTC) #7
ccameron
Thanks! https://codereview.chromium.org/13746002/diff/7001/gpu/command_buffer/service/gpu_driver_bug_workaround_type.h File gpu/command_buffer/service/gpu_driver_bug_workaround_type.h (right): https://codereview.chromium.org/13746002/diff/7001/gpu/command_buffer/service/gpu_driver_bug_workaround_type.h#newcode54 gpu/command_buffer/service/gpu_driver_bug_workaround_type.h:54: force_cgl_set_virtual_screen) On 2013/04/08 17:46:16, Zhenyao Mo wrote: > ...
7 years, 8 months ago (2013-04-08 17:50:15 UTC) #8
Zhenyao Mo
On 2013/04/08 17:50:15, ccameron1 wrote: > Thanks! > > https://codereview.chromium.org/13746002/diff/7001/gpu/command_buffer/service/gpu_driver_bug_workaround_type.h > File gpu/command_buffer/service/gpu_driver_bug_workaround_type.h (right): > ...
7 years, 8 months ago (2013-04-08 17:54:38 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/13746002/18001
7 years, 8 months ago (2013-04-08 18:20:01 UTC) #10
commit-bot: I haz the power
Presubmit check for 13746002-18001 failed and returned exit status 1. INFO:root:Found 5 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-08 18:20:04 UTC) #11
ccameron
gman, does this LG for the ui/ and gpu/ paths?
7 years, 8 months ago (2013-04-08 20:38:33 UTC) #12
Ken Russell (switch to Gerrit)
LGTM
7 years, 8 months ago (2013-04-08 20:45:29 UTC) #13
ccameron
New version of this patch. This time - only transition compositor contexts - disable the ...
7 years, 8 months ago (2013-04-09 00:33:27 UTC) #14
jbauman
lgtm https://codereview.chromium.org/13746002/diff/20001/ui/gl/gl_context_cgl.cc File ui/gl/gl_context_cgl.cc (right): https://codereview.chromium.org/13746002/diff/20001/ui/gl/gl_context_cgl.cc#newcode22 ui/gl/gl_context_cgl.cc:22: bool g_safe_to_force_gpu_switch = false; Not necessary anymore.
7 years, 8 months ago (2013-04-09 00:47:13 UTC) #15
Ken Russell (switch to Gerrit)
Looks mostly good to me but a couple of concerns. https://codereview.chromium.org/13746002/diff/20001/gpu/command_buffer/service/framebuffer_manager.cc File gpu/command_buffer/service/framebuffer_manager.cc (right): https://codereview.chromium.org/13746002/diff/20001/gpu/command_buffer/service/framebuffer_manager.cc#newcode20 ...
7 years, 8 months ago (2013-04-09 00:48:58 UTC) #16
jbauman
Yeah, we discovered that if you first create a canvas context on the integrated GPU, ...
7 years, 8 months ago (2013-04-09 00:57:36 UTC) #17
Ken Russell (switch to Gerrit)
On 2013/04/09 00:57:36, jbauman wrote: > Yeah, we discovered that if you first create a ...
7 years, 8 months ago (2013-04-09 01:11:44 UTC) #18
ccameron
Thanks!! This should be simple to merge to M27 -- I'll probably want to do ...
7 years, 8 months ago (2013-04-09 17:28:55 UTC) #19
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/13746002/diff/20001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/13746002/diff/20001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode2580 gpu/command_buffer/service/gles2_cmd_decoder.cc:2580: context_->SetSafeToForceGpuSwitch(); On 2013/04/09 17:28:55, ccameron1 wrote: > On 2013/04/09 ...
7 years, 8 months ago (2013-04-09 17:42:03 UTC) #20
ccameron
Thanks -- added TODO. Need gman for gpu/OWNER. IMO the post-M27 solution should be to ...
7 years, 8 months ago (2013-04-09 18:46:02 UTC) #21
ccameron
Adding apatrick for OWNER review.
7 years, 8 months ago (2013-04-09 20:45:13 UTC) #22
apatrick_chromium
lgtm
7 years, 8 months ago (2013-04-09 20:55:10 UTC) #23
ccameron
Thanks!!
7 years, 8 months ago (2013-04-09 20:56:15 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/13746002/36001
7 years, 8 months ago (2013-04-09 20:57:29 UTC) #25
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) gpu_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=116571
7 years, 8 months ago (2013-04-09 22:21:54 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/13746002/51001
7 years, 8 months ago (2013-04-10 00:11:55 UTC) #27
commit-bot: I haz the power
7 years, 8 months ago (2013-04-10 02:52:39 UTC) #28
Message was sent while issue was closed.
Change committed as 193302

Powered by Google App Engine
This is Rietveld 408576698