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

Issue 15841002: gpu: Fix corrupted state due to virtual MakeCurrent race. (Closed)

Created:
7 years, 7 months ago by epenner
Modified:
7 years, 6 months ago
Reviewers:
greggman, no sievers
CC:
chromium-reviews, apatrick_chromium, boliu, jonathan.backer
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Reland "GPU: Reduce MakeCurrent calls to fix Orange San Diego"" This patch now also always calls MakeVirtuallyCurrent during initialize and MakeCurrent, such that the next context will always restore. The context state is restored only if the API has changed or the virtually current context has changed, so we should never skip calling MakeVirtuallyCurrent. BUG=241188 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202561

Patch Set 1 #

Total comments: 5

Patch Set 2 : Use MakeVirtuallyCurrent instead. #

Patch Set 3 : Fix initialize. #

Patch Set 4 : Reland patch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -19 lines) Patch
M gpu/command_buffer/service/gl_context_virtual.cc View 1 2 3 3 chunks +25 lines, -18 lines 0 comments Download
M gpu/command_buffer/service/gl_state_restorer_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gl_state_restorer_impl.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gl/gl_gl_api_implementation.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M ui/gl/gl_state_restorer.h View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
epenner
Ptal. I just figured out why this didn't happen before. Some real MakeCurrent calls set ...
7 years, 7 months ago (2013-05-23 09:09:22 UTC) #1
no sievers
https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc File gpu/command_buffer/service/gl_context_virtual.cc (right): https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc#newcode61 gpu/command_buffer/service/gl_context_virtual.cc:61: shared_context_->MakeVirtuallyCurrent(NULL, NULL); Hmm I don't understand how current_context_ in ...
7 years, 7 months ago (2013-05-23 15:58:36 UTC) #2
no sievers
On 2013/05/23 15:58:36, Daniel Sievers wrote: > https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc > File gpu/command_buffer/service/gl_context_virtual.cc (right): > > https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc#newcode61 ...
7 years, 7 months ago (2013-05-23 16:01:24 UTC) #3
no sievers
https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc File gpu/command_buffer/service/gl_context_virtual.cc (right): https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc#newcode61 gpu/command_buffer/service/gl_context_virtual.cc:61: shared_context_->MakeVirtuallyCurrent(NULL, NULL); On 2013/05/23 15:58:36, Daniel Sievers wrote: > ...
7 years, 7 months ago (2013-05-23 16:04:43 UTC) #4
no sievers
https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc File gpu/command_buffer/service/gl_context_virtual.cc (right): https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc#newcode61 gpu/command_buffer/service/gl_context_virtual.cc:61: shared_context_->MakeVirtuallyCurrent(NULL, NULL); On 2013/05/23 16:04:43, Daniel Sievers wrote: > ...
7 years, 7 months ago (2013-05-23 17:04:34 UTC) #5
epenner
I think you mostly described the issue, but let me rephrase. The problem is, for ...
7 years, 7 months ago (2013-05-23 17:57:11 UTC) #6
epenner
https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc File gpu/command_buffer/service/gl_context_virtual.cc (right): https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc#newcode61 gpu/command_buffer/service/gl_context_virtual.cc:61: shared_context_->MakeVirtuallyCurrent(NULL, NULL); If it was added for cleanup calls, ...
7 years, 7 months ago (2013-05-23 18:00:03 UTC) #7
epenner
Note that previously if we always forwarded to the real MakeCurrent, that would change the ...
7 years, 7 months ago (2013-05-23 18:04:20 UTC) #8
epenner
On 2013/05/23 18:04:20, epenner wrote: > Note that previously if we always forwarded to the ...
7 years, 7 months ago (2013-05-24 00:52:49 UTC) #9
greggman
If it works great. Tangentially, does static GLApi* g_gl; need to be per thread?
7 years, 7 months ago (2013-05-24 00:56:02 UTC) #10
greggman
lgtm https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc File gpu/command_buffer/service/gl_context_virtual.cc (right): https://codereview.chromium.org/15841002/diff/1/gpu/command_buffer/service/gl_context_virtual.cc#newcode56 gpu/command_buffer/service/gl_context_virtual.cc:56: if (decoder_.get() && decoder_->initialized()) nit: if there's braces ...
7 years, 7 months ago (2013-05-24 00:56:47 UTC) #11
no sievers
On 2013/05/24 00:56:02, greggman wrote: > If it works great. Tangentially, does > > static ...
7 years, 7 months ago (2013-05-24 01:38:22 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/15841002/18002
7 years, 6 months ago (2013-05-28 07:50:38 UTC) #13
commit-bot: I haz the power
7 years, 6 months ago (2013-05-28 14:43:57 UTC) #14
Message was sent while issue was closed.
Change committed as 202561

Powered by Google App Engine
This is Rietveld 408576698