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

Issue 10797055: gpu in-memory program cache implementation with a memory limit + lru eviction. (Closed)

Created:
8 years, 5 months ago by dmurph
Modified:
8 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

gpu in-memory program cache implementation with a memory limit + lru eviction. Wiring: - Added bindings for glProgramBinary, glGetProgramBinary, glProgramParameteri - Plumbed the shader cache from gl_channel_manager to program_manager - Program cache creation after first context is created Refactoring: - moved DoCompile to ProgramManager New: - added functionality to ShaderInfo to store if we have a possible pending cache compile - exposed attrib_map and uniform_map in ShaderInfo for the cache - program_cache base class with in-memory status storage - Simple memory_program_cache implementation, stores programs with lru eviction - Added caching logic to DoCompileShader and Link in ProgramMAnager - MemoryProgramCache, the in-memory cache implementation - ProgramCacheLruHelper, an O(1) lru implementation Misc: - A couple style fixes in modified files Design doc: https://docs.google.com/document/d/1Vceem-nF4TCICoeGSh7OMXxfGuJEJYblGXRgN9V9hcE/edit BUG=88572 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=147932

Patch Set 1 #

Patch Set 2 : simplified binary loading logic #

Total comments: 9

Patch Set 3 : nit fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2257 lines, -90 lines) Patch
M content/common/gpu/gpu_channel.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.h View 4 chunks +7 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.cc View 4 chunks +17 lines, -2 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gl_mock.h View 2 chunks +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/context_group.h View 3 chunks +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/context_group.cc View 3 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gl_utils.h View 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 2 chunks +12 lines, -48 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc View 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 2 chunks +2 lines, -2 lines 0 comments Download
A gpu/command_buffer/service/memory_program_cache.h View 1 chunk +88 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/memory_program_cache.cc View 1 chunk +173 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/memory_program_cache_unittest.cc View 1 2 1 chunk +417 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/mocks.h View 2 chunks +21 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/mocks.cc View 1 chunk +3 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/program_cache.h View 1 chunk +127 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/program_cache.cc View 1 chunk +175 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/program_cache_lru_helper.h View 1 chunk +51 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/program_cache_lru_helper.cc View 1 chunk +49 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/program_cache_lru_helper_unittest.cc View 1 chunk +84 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/program_cache_unittest.cc View 1 chunk +249 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/program_manager.h View 9 chunks +31 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/program_manager.cc View 1 2 7 chunks +157 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/program_manager_unittest.cc View 10 chunks +384 lines, -10 lines 0 comments Download
M gpu/command_buffer/service/shader_manager.h View 4 chunks +54 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/shader_manager.cc View 2 chunks +5 lines, -1 line 0 comments Download
M gpu/command_buffer/service/shader_manager_unittest.cc View 1 chunk +34 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/shader_translator.h View 1 chunk +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/test_helper.h View 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/test_helper.cc View 4 chunks +20 lines, -9 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M gpu/command_buffer_service.gypi View 2 chunks +6 lines, -0 lines 0 comments Download
M gpu/demos/framework/window.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/gpu_common.gypi View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gl/generate_bindings.py View 2 chunks +16 lines, -0 lines 0 comments Download
M ui/gl/gl_interface.h View 2 chunks +13 lines, -0 lines 0 comments Download
M webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
dmurph
Updated patch with the correct extension check, caching hint on desktop, and force compile/link on ...
8 years, 5 months ago (2012-07-20 22:27:08 UTC) #1
dmurph
simplified binary loading logic, git trying again
8 years, 5 months ago (2012-07-20 22:47:36 UTC) #2
greggman
just a few style issues otherwise LGTM https://chromiumcodereview.appspot.com/10797055/diff/1040/gpu/command_buffer/service/memory_program_cache_unittest.cc File gpu/command_buffer/service/memory_program_cache_unittest.cc (right): https://chromiumcodereview.appspot.com/10797055/diff/1040/gpu/command_buffer/service/memory_program_cache_unittest.cc#newcode177 gpu/command_buffer/service/memory_program_cache_unittest.cc:177: char testBinary[kBinaryLength]; ...
8 years, 5 months ago (2012-07-21 00:49:32 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmurph@chromium.org/10797055/11001
8 years, 5 months ago (2012-07-23 18:34:39 UTC) #4
commit-bot: I haz the power
8 years, 5 months ago (2012-07-23 20:39:42 UTC) #5
Change committed as 147932

Powered by Google App Engine
This is Rietveld 408576698