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

Issue 162023002: Reduce internal Flush() in GL resource glGen/Delete APIs. (Closed)

Created:
6 years, 10 months ago by vmiura
Modified:
6 years, 8 months ago
CC:
chromium-reviews, piman+watch_chromium.org, Vangelis Kokkevis, Zhenyao Mo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Reduce internal Flush() in GL resource glGen/Delete APIs. Previously command buffer Flush() was inserted in all glGen/glDelete APIs to preserve glGen/glDelete/glBind ordering semantics across shared contexts. This change removes auto Flush() on glGen*, and requires that users call glFlush or glFinish explicitly to guarantee ordering semantics. Further for share groups without bind_generates_resouce semantic, this change replaces the auto Flush() on glDelete* with lazy ID collection. BUG=343269 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252635

Patch Set 1 #

Total comments: 12

Patch Set 2 : Per-context freed_ids and flush_generation. Cross-context unittests. Expanded DCHECK in MarkAsUse… #

Patch Set 3 : test_contexts_[2] -> test_contexts_[kNumTestContexts] #

Total comments: 2

Patch Set 4 : nit: explicit #

Patch Set 5 : Chromium style. #

Patch Set 6 : Bogus comment. Explicit flush only in test. #

Patch Set 7 : Lock required in FreeContext(). #

Total comments: 8

Patch Set 8 : Fix order of gl_impl->*delete_fn() call. Add unit test for this. #

Patch Set 9 : Remove program_info_manager.cc fix. Create separate CL for this. #

Total comments: 10

Patch Set 10 : Simplified StrictIdHandler to use tri-state Id state array. #

Patch Set 11 : Revert lock_ pattern change in IdHandler::FreeIds. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+538 lines, -106 lines) Patch
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 5 6 8 9 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/client/cmd_buffer_helper.h View 2 chunks +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/cmd_buffer_helper.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/cmd_buffer_helper_test.cc View 1 2 3 4 5 2 chunks +45 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_impl_autogen.h View 1 6 chunks +12 lines, -6 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 2 3 4 5 6 7 7 chunks +323 lines, -93 lines 0 comments Download
M gpu/command_buffer/client/share_group.h View 1 2 3 4 5 6 7 8 9 3 chunks +27 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/share_group.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +112 lines, -6 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
vmiura
PTAL.
6 years, 10 months ago (2014-02-12 23:28:11 UTC) #1
piman
https://codereview.chromium.org/162023002/diff/1/gpu/command_buffer/client/gles2_implementation_unittest.cc File gpu/command_buffer/client/gles2_implementation_unittest.cc (right): https://codereview.chromium.org/162023002/diff/1/gpu/command_buffer/client/gles2_implementation_unittest.cc#newcode2529 gpu/command_buffer/client/gles2_implementation_unittest.cc:2529: } It would be good to add tests for ...
6 years, 10 months ago (2014-02-12 23:52:32 UTC) #2
vmiura
https://codereview.chromium.org/162023002/diff/1/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1/gpu/command_buffer/client/share_group.cc#newcode41 gpu/command_buffer/client/share_group.cc:41: } On 2014/02/12 23:52:34, piman wrote: > We should ...
6 years, 10 months ago (2014-02-13 00:20:16 UTC) #3
piman
https://codereview.chromium.org/162023002/diff/1/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1/gpu/command_buffer/client/share_group.cc#newcode41 gpu/command_buffer/client/share_group.cc:41: } On 2014/02/13 00:20:17, vmiura wrote: > On 2014/02/12 ...
6 years, 10 months ago (2014-02-13 00:48:52 UTC) #4
vmiura
PTAL. This is getting more chunky, but tried to change as little as poss. https://codereview.chromium.org/162023002/diff/1/gpu/command_buffer/client/gles2_implementation_unittest.cc ...
6 years, 10 months ago (2014-02-14 00:11:11 UTC) #5
piman
LGTM. https://codereview.chromium.org/162023002/diff/200001/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/200001/gpu/command_buffer/client/share_group.cc#newcode82 gpu/command_buffer/client/share_group.cc:82: StrictIdHandler(int id_namespace) : id_namespace_(id_namespace) {} nit: explicit
6 years, 10 months ago (2014-02-14 01:56:19 UTC) #6
vmiura
https://codereview.chromium.org/162023002/diff/200001/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/200001/gpu/command_buffer/client/share_group.cc#newcode82 gpu/command_buffer/client/share_group.cc:82: StrictIdHandler(int id_namespace) : id_namespace_(id_namespace) {} On 2014/02/14 01:56:20, piman ...
6 years, 10 months ago (2014-02-14 02:18:12 UTC) #7
vmiura
Hmm, one (and only one) trybot WebGl conformance test is failing. Can't repro this locally. ...
6 years, 10 months ago (2014-02-14 21:36:21 UTC) #8
piman
On 2014/02/14 21:36:21, vmiura wrote: > Hmm, one (and only one) trybot WebGl conformance test ...
6 years, 10 months ago (2014-02-14 22:08:53 UTC) #9
vmiura
Could reproduce the error on the gpu-bot, however not when any logging is enabled. There ...
6 years, 10 months ago (2014-02-15 01:18:57 UTC) #10
vmiura
A few bugs to solve. https://codereview.chromium.org/162023002/diff/760001/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/760001/gpu/command_buffer/client/share_group.cc#newcode117 gpu/command_buffer/client/share_group.cc:117: CollectPendingFreeIds(gl_impl); Bug: CollectPendingFreeIds() is ...
6 years, 10 months ago (2014-02-16 17:41:31 UTC) #11
vmiura
https://codereview.chromium.org/162023002/diff/760001/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/760001/gpu/command_buffer/client/share_group.cc#newcode117 gpu/command_buffer/client/share_group.cc:117: CollectPendingFreeIds(gl_impl); On 2014/02/16 17:41:31, vmiura wrote: > Bug: CollectPendingFreeIds() ...
6 years, 10 months ago (2014-02-16 20:28:00 UTC) #12
vmiura
https://chromiumcodereview.appspot.com/162023002/diff/760001/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://chromiumcodereview.appspot.com/162023002/diff/760001/gpu/command_buffer/client/share_group.cc#newcode125 gpu/command_buffer/client/share_group.cc:125: On 2014/02/16 17:41:31, vmiura wrote: > Bug: Keeping freed_ids_ ...
6 years, 10 months ago (2014-02-18 20:08:08 UTC) #13
vmiura
Please take another look. I think CachedProgramInfoManager::DeleteInfo(GLuint program) is missing a lock, but it's an ...
6 years, 10 months ago (2014-02-18 21:15:01 UTC) #14
piman
https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc#newcode60 gpu/command_buffer/client/share_group.cc:60: (gl_impl->*delete_fn)(n, ids); Isn't there a race where another thread ...
6 years, 10 months ago (2014-02-18 22:16:47 UTC) #15
vmiura
https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc#newcode60 gpu/command_buffer/client/share_group.cc:60: (gl_impl->*delete_fn)(n, ids); On 2014/02/18 22:16:48, piman wrote: > Isn't ...
6 years, 10 months ago (2014-02-18 23:04:20 UTC) #16
vmiura
PTAL. https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc#newcode193 gpu/command_buffer/client/share_group.cc:193: std::set<GLuint> group_freed_ids_; On 2014/02/18 23:04:20, vmiura wrote: > ...
6 years, 10 months ago (2014-02-18 23:28:01 UTC) #17
piman
https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc#newcode60 gpu/command_buffer/client/share_group.cc:60: (gl_impl->*delete_fn)(n, ids); On 2014/02/18 23:04:20, vmiura wrote: > On ...
6 years, 10 months ago (2014-02-18 23:28:26 UTC) #18
vmiura
https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc#newcode60 gpu/command_buffer/client/share_group.cc:60: (gl_impl->*delete_fn)(n, ids); On 2014/02/18 23:28:26, piman wrote: > On ...
6 years, 10 months ago (2014-02-18 23:36:48 UTC) #19
vmiura
https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc#newcode60 gpu/command_buffer/client/share_group.cc:60: (gl_impl->*delete_fn)(n, ids); On 2014/02/18 23:36:48, vmiura wrote: > On ...
6 years, 10 months ago (2014-02-18 23:42:25 UTC) #20
vmiura
PTAL. https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc File gpu/command_buffer/client/share_group.cc (right): https://codereview.chromium.org/162023002/diff/1030002/gpu/command_buffer/client/share_group.cc#newcode60 gpu/command_buffer/client/share_group.cc:60: (gl_impl->*delete_fn)(n, ids); On 2014/02/18 23:42:25, vmiura wrote: > ...
6 years, 10 months ago (2014-02-19 19:39:22 UTC) #21
vmiura
The CQ bit was checked by vmiura@chromium.org
6 years, 10 months ago (2014-02-21 18:35:06 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmiura@chromium.org/162023002/1240002
6 years, 10 months ago (2014-02-21 18:35:15 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmiura@chromium.org/162023002/1240002
6 years, 10 months ago (2014-02-21 19:13:03 UTC) #24
commit-bot: I haz the power
6 years, 10 months ago (2014-02-21 20:42:53 UTC) #25
Message was sent while issue was closed.
Change committed as 252635

Powered by Google App Engine
This is Rietveld 408576698