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

Issue 1241433003: Rebind EGL context to flush driver caches. (Closed)

Created:
5 years, 5 months ago by ericrk
Modified:
5 years, 5 months ago
Reviewers:
ericrk1, boliu, piman
CC:
chromium-reviews, ozone-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rebind EGL context to flush driver caches Android Adreno drivers do not flush caches on glFinish, making it hard to clear up app resources when going to the background. To work around this, we introduce a glFlushDriverCachesCHROMIUM call which does the right thing based on the driver workaround list. On most cards, this call simply does a glFinish, which will clean up driver caches. On Adreno GPUs, this call binds a NULL surface/context then re-binds the correct surface/context. This causes the driver's texture cache to flush, reducing our memory usage by around ~6mb. BUG=505495, 509727 Committed: https://crrev.com/9c79932e180918336f6140236a2cdedcaed4f535 Cr-Commit-Position: refs/heads/master@{#338883}

Patch Set 1 #

Total comments: 5

Patch Set 2 : feedback #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : Don't issue new commands if no command buffer #

Patch Set 5 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -20 lines) Patch
M gpu/GLES2/gl2chromium_autogen.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 1 chunk +10 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_impl_autogen.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest_autogen.h View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_autogen.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_autogen.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_autogen.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/cmd_buffer_functions.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_ids_autogen.h View 1 2 3 4 1 chunk +17 lines, -16 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/config/gpu_driver_bug_list_json.cc View 1 2 3 4 2 chunks +13 lines, -1 line 0 comments Download
M gpu/config/gpu_driver_bug_workaround_type.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/gpu/mojo_gles2_impl_autogen.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M mojo/gpu/mojo_gles2_impl_autogen.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (18 generated)
ericrk
Please take a look at this patch and let me know if the approach seems ...
5 years, 5 months ago (2015-07-13 21:15:34 UTC) #2
piman
https://codereview.chromium.org/1241433003/diff/1/content/browser/android/in_process/synchronous_compositor_output_surface.cc File content/browser/android/in_process/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/1241433003/diff/1/content/browser/android/in_process/synchronous_compositor_output_surface.cc#newcode261 content/browser/android/in_process/synchronous_compositor_output_surface.cc:261: context_provider()->ContextGL()->FlushDriverCachesCHROMIUM(); Should we do this before SetAggressivelyFreeResources? Otherwise: - ...
5 years, 5 months ago (2015-07-13 21:25:29 UTC) #3
ericrk
Thanks for the feedback! https://codereview.chromium.org/1241433003/diff/1/content/browser/android/in_process/synchronous_compositor_output_surface.cc File content/browser/android/in_process/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/1241433003/diff/1/content/browser/android/in_process/synchronous_compositor_output_surface.cc#newcode261 content/browser/android/in_process/synchronous_compositor_output_surface.cc:261: context_provider()->ContextGL()->FlushDriverCachesCHROMIUM(); On 2015/07/13 21:25:29, piman ...
5 years, 5 months ago (2015-07-13 22:11:11 UTC) #7
piman
https://codereview.chromium.org/1241433003/diff/120001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/1241433003/diff/120001/gpu/command_buffer/client/gles2_implementation.cc#newcode330 gpu/command_buffer/client/gles2_implementation.cc:330: if (aggressively_free_resources_) { aggressively_free_resources_ && HaveRingBuffer() That way, we ...
5 years, 5 months ago (2015-07-13 22:48:07 UTC) #9
piman
https://codereview.chromium.org/1241433003/diff/120001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/1241433003/diff/120001/gpu/command_buffer/client/gles2_implementation.cc#newcode330 gpu/command_buffer/client/gles2_implementation.cc:330: if (aggressively_free_resources_) { On 2015/07/13 22:48:07, piman (Very slow ...
5 years, 5 months ago (2015-07-13 22:48:49 UTC) #10
ericrk
https://codereview.chromium.org/1241433003/diff/120001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/1241433003/diff/120001/gpu/command_buffer/client/gles2_implementation.cc#newcode330 gpu/command_buffer/client/gles2_implementation.cc:330: if (aggressively_free_resources_) { On 2015/07/13 22:48:48, piman (Very slow ...
5 years, 5 months ago (2015-07-13 23:07:52 UTC) #12
piman
lgtm
5 years, 5 months ago (2015-07-14 02:20:42 UTC) #13
boliu
description says glFinish is called on most cards. That's missing I think?
5 years, 5 months ago (2015-07-14 15:18:09 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1241433003/220001
5 years, 5 months ago (2015-07-15 01:14:45 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/71766) (exceeded global retry quota)
5 years, 5 months ago (2015-07-15 01:29:11 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1241433003/220001
5 years, 5 months ago (2015-07-15 16:35:35 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1241433003/220001
5 years, 5 months ago (2015-07-15 17:24:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1241433003/220001
5 years, 5 months ago (2015-07-15 17:46:53 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:220001)
5 years, 5 months ago (2015-07-15 17:55:25 UTC) #32
commit-bot: I haz the power
5 years, 5 months ago (2015-07-15 17:56:38 UTC) #33
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/9c79932e180918336f6140236a2cdedcaed4f535
Cr-Commit-Position: refs/heads/master@{#338883}

Powered by Google App Engine
This is Rietveld 408576698