Disjoint blob caches for concurrent decoders |
||||||
Issue descriptionGLES2DecoderPassthroughImpl sets up a cache for blobs (including shader binaries), but it needs to avoid using this cache for other decoders for privacy reasons. See the following transcript for details (from https://chromium-review.googlesource.com/c/chromium/src/+/1251325/3/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc#1155): Antoine Labour: We should figure out what we need to do so that this gets reset when another decoder (namely, I'm thinking RasterDecoderImpl) gets made current. We wouldn't want shaders created by it to get cached with the origin of the last GLES2DecoderPassthroughImpl that was made current (it would have privacy implications). RasterDecoderImpl have their own cache mechanism (see https://cs.chromium.org/chromium/src/gpu/ipc/service/command_buffer_stub.cc?q=gpu/ipc/service/command_buffer_stub.cc&sq=package:chromium&g=0&l=535). Currently RasterDecoderImpl doesn't work with passthrough (see crbug.com/829435) but we need to make sure we don't run into this when the dependencies are fixed. Any thought there? It may be ok to tackle as a follow-up, but we should file a bug to revisit this. Shahbaz Youssefi: The behavior here hasn't changed (it's passthrough instead of angle doing the caching), so perhaps this was already a problem? Do you know if changing decoders implies destroying one and creating another? If so, there's a call to `ResetCacheProgramCallback()` on `Destroy()` which should take care of this. Antoine Labour: No, these various types of decoders are used concurrently. E.g. GLES2DecoderPassthroughImpl used for webgl while RasterDecoderImpl used for cc. You're right that this is already a problem, but this is something we'll need to fix, but could be in a follow-up. The proper way I think is to scope the global state around when commands are executed, that is around the CommandBufferService::Flush in CommandBufferStub:OnAsyncFlush (and InProcessCommandBuffer::FlushOnGpuThread), pretty much just like the raster::GrShaderCache::ScopedCacheUse.
,
Oct 1
,
Oct 5
,
Nov 22
I'll take this. I have a prototype of RasterDecoder up and running with passthrough (both CPU raster and OOP-R). There are some details to work out, but I think we can do this for M73 and this is blocking it.
,
Jan 10
,
Jan 10
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eaf6bd66a006cc36b9289690ddf595ee5c7819b6 commit eaf6bd66a006cc36b9289690ddf595ee5c7819b6 Author: Jonathan Backer <backer@chromium.org> Date: Thu Jan 10 22:09:19 2019 Set blob cache callback for all decoders This ensures that when a RasterDecoderImpl gets made current that the ANGLE blob cache callbacks get updated. Bug: 890845 Change-Id: I4972da145d9a0f3c77bb32aa302c41908ef2c3a1 Reviewed-on: https://chromium-review.googlesource.com/c/1405290 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Jonathan Backer <backer@chromium.org> Cr-Commit-Position: refs/heads/master@{#621771} [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/command_buffer/service/memory_program_cache.h [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/command_buffer/service/mocks.h [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/command_buffer/service/passthrough_program_cache.h [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/command_buffer/service/program_cache.cc [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/command_buffer/service/program_cache.h [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/command_buffer/service/program_cache_unittest.cc [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/ipc/command_buffer_task_executor.cc [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/ipc/in_process_command_buffer.cc [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/ipc/in_process_command_buffer.h [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/ipc/service/command_buffer_stub.cc [modify] https://crrev.com/eaf6bd66a006cc36b9289690ddf595ee5c7819b6/gpu/ipc/service/command_buffer_stub.h
,
Jan 14
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by syoussefi@chromium.org
, Oct 1