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

Issue 245923008: Optimize GLES2DecoderImpl::ApplyDirtyState. (Closed)

Created:
6 years, 8 months ago by vmiura
Modified:
6 years, 7 months ago
Reviewers:
oetuaho-nv, jbates, piman
CC:
chromium-reviews, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, piman+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org, Ken Russell (switch to Gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Optimize GLES2DecoderImpl::ApplyDirtyState. ApplyDirtyState can on average 30% of the time of GLES2 draw calls. It previously set Color, Depth, Stencil masks and several enables without checking if they changed. This change caches values used in ApplyDirtyState among other places, and adds ContextState methods for setting state with cache checks. New cached state aware Set methods: * ContextState::SetDeviceCapabilityState * ContextState::SetDeviceColorMask * ContextState::SetDeviceDepthMask * ContextState::SetDeviceStencilMaskSeparate Testing: * gpu_unit tests now run both with cache on and off (ignore_cached_state_for_test = true) to validate behavior independent of cache layering. * New tests specific for caching behavior: ** GLES2DecoderManualInitTest.ContextStateCapabilityCaching ** GLES2DecoderManualInitTest.CachedColorMask ** GLES2DecoderManualInitTest.CachedDepthMask ** GLES2DecoderManualInitTest.CachedStencilMask BUG=347364 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267450 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268017

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Update unit tests. #

Patch Set 4 : Cache mask states. Begin refactor to device_state. #

Patch Set 5 : Auto generate most state caching changes. #

Patch Set 6 : Additional unit tests. #

Patch Set 7 : Rebase #

Patch Set 8 : Rebase #

Patch Set 9 : Autogen SetDeviceCapabilityState. #

Patch Set 10 : Undo mojo/ format changes. #

Patch Set 11 : Removed unused struct ContextState::States. #

Total comments: 3

Patch Set 12 : All gpu_unittests expectations pass with and without state caching. #

Patch Set 13 : Parameterize all GLES2Decoder tests for cached and uncached state. #

Patch Set 14 : Remove mojo/ reformatting. #

Patch Set 15 : Rebase on refactored gles2_cmd_decoder_unittest.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1668 lines, -1043 lines) Patch
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 5 6 7 8 9 10 11 12 47 chunks +164 lines, -57 lines 0 comments Download
M gpu/command_buffer/service/context_state.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +43 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/context_state.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M gpu/command_buffer/service/context_state_autogen.h View 1 2 3 4 5 6 7 8 4 chunks +74 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/context_state_impl_autogen.h View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +76 lines, -48 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.h View 1 1 chunk +2 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 10 11 12 13 14 16 chunks +46 lines, -46 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +47 lines, -13 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_mock.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 30 chunks +62 lines, -33 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h View 1 2 3 4 5 6 7 8 9 10 11 12 168 chunks +170 lines, -170 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +17 lines, -15 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h View 1 2 3 4 5 6 7 8 9 10 11 12 152 chunks +152 lines, -152 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_3.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_async_pixel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +39 lines, -31 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +35 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +165 lines, -83 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +51 lines, -9 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 84 chunks +231 lines, -127 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 56 chunks +147 lines, -123 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 60 chunks +62 lines, -62 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 60 chunks +68 lines, -64 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
vmiura
PTAL. Originally I wanted to implement bit-fields to speed up code for state change checking, ...
6 years, 7 months ago (2014-04-29 18:19:57 UTC) #1
piman
https://codereview.chromium.org/245923008/diff/190001/gpu/command_buffer/service/context_state.h File gpu/command_buffer/service/context_state.h (right): https://codereview.chromium.org/245923008/diff/190001/gpu/command_buffer/service/context_state.h#newcode207 gpu/command_buffer/service/context_state.h:207: bool ignore_cached_state; It's rather unfortunate that we disable caching ...
6 years, 7 months ago (2014-04-29 21:49:33 UTC) #2
vmiura
https://codereview.chromium.org/245923008/diff/190001/gpu/command_buffer/service/context_state.h File gpu/command_buffer/service/context_state.h (right): https://codereview.chromium.org/245923008/diff/190001/gpu/command_buffer/service/context_state.h#newcode207 gpu/command_buffer/service/context_state.h:207: bool ignore_cached_state; On 2014/04/29 21:49:33, piman wrote: > It's ...
6 years, 7 months ago (2014-04-29 23:15:20 UTC) #3
vmiura
https://codereview.chromium.org/245923008/diff/190001/gpu/command_buffer/service/context_state.h File gpu/command_buffer/service/context_state.h (right): https://codereview.chromium.org/245923008/diff/190001/gpu/command_buffer/service/context_state.h#newcode207 gpu/command_buffer/service/context_state.h:207: bool ignore_cached_state; On 2014/04/29 23:15:21, vmiura wrote: > On ...
6 years, 7 months ago (2014-04-29 23:39:48 UTC) #4
piman
On Tue, Apr 29, 2014 at 4:15 PM, <vmiura@chromium.org> wrote: > > https://codereview.chromium.org/245923008/diff/190001/gpu/ > command_buffer/service/context_state.h ...
6 years, 7 months ago (2014-04-29 23:49:52 UTC) #5
piman
On Tue, Apr 29, 2014 at 4:39 PM, <vmiura@chromium.org> wrote: > > https://codereview.chromium.org/245923008/diff/190001/gpu/ > command_buffer/service/context_state.h ...
6 years, 7 months ago (2014-04-30 00:22:10 UTC) #6
vmiura
Thanks for the tip! I've parameterized the tests. PTAL
6 years, 7 months ago (2014-04-30 18:59:59 UTC) #7
piman
lgtm
6 years, 7 months ago (2014-04-30 22:15:16 UTC) #8
vmiura
The CQ bit was checked by vmiura@chromium.org
6 years, 7 months ago (2014-04-30 22:23:12 UTC) #9
vmiura
The CQ bit was unchecked by vmiura@chromium.org
6 years, 7 months ago (2014-04-30 22:23:28 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmiura@chromium.org/245923008/230001
6 years, 7 months ago (2014-04-30 22:23:47 UTC) #11
vmiura
The CQ bit was checked by vmiura@chromium.org
6 years, 7 months ago (2014-04-30 22:24:23 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmiura@chromium.org/245923008/230001
6 years, 7 months ago (2014-04-30 22:27:01 UTC) #13
vmiura
The CQ bit was unchecked by vmiura@chromium.org
6 years, 7 months ago (2014-04-30 22:28:43 UTC) #14
vmiura
The CQ bit was checked by vmiura@chromium.org
6 years, 7 months ago (2014-04-30 22:32:21 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmiura@chromium.org/245923008/250001
6 years, 7 months ago (2014-04-30 22:33:44 UTC) #16
commit-bot: I haz the power
Change committed as 267450
6 years, 7 months ago (2014-05-01 05:56:10 UTC) #17
tapted
A revert of this CL has been created in https://codereview.chromium.org/262793002/ by tapted@chromium.org. The reason for ...
6 years, 7 months ago (2014-05-01 07:40:24 UTC) #18
vmiura
On 2014/05/01 07:40:24, tapted wrote: > A revert of this CL has been created in ...
6 years, 7 months ago (2014-05-01 22:09:44 UTC) #19
piman
On 2014/05/01 22:09:44, vmiura wrote: > On 2014/05/01 07:40:24, tapted wrote: > > A revert ...
6 years, 7 months ago (2014-05-01 22:32:38 UTC) #20
vmiura
The CQ bit was checked by vmiura@chromium.org
6 years, 7 months ago (2014-05-03 00:27:28 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmiura@chromium.org/245923008/270001
6 years, 7 months ago (2014-05-03 00:27:51 UTC) #22
commit-bot: I haz the power
6 years, 7 months ago (2014-05-03 02:49:47 UTC) #23
Message was sent while issue was closed.
Change committed as 268017

Powered by Google App Engine
This is Rietveld 408576698