summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2021-06-10 10:26:15 -0700
committer Alec Mouri <alecmouri@google.com> 2021-06-11 09:45:35 -0700
commit39d9cb709937ccecf41a266340ffdf5e5c7020f2 (patch)
tree1a83fb65c80f54723506445c472e4a4b3f74c148 /vulkan/libvulkan/api.cpp
parentcda04d4f37869ee98caa9df3c865c98e3e4c8ca4 (diff)
Reduce contention for renderengine's async ops.
RenderEngine was holding a lock when executing work items in a task queue. The lock was intended for managing the task queue itself since we're not using a concurrent data structure for the queue, but the lock was not required to be held while executing work. This was causing performance issues where if multiple ExternalTextures were destroyed very closely in time, subsequent requests to unmap the underlying GrBackendTexture needed to block on prior requests to finish. The exemplary case is destroying a layer, where many buffers associated with that layer needed to be freed on the main thread. The fix in this patch is two-fold: 1. Don't lock anything else with the work queue lock 2. (1) breaks thread-safety for mRunning, so make it atomic which is sufficient since it's only used for safe destruction. Bug: 188632264 Bug: 190375955 Test: Perfetto trace of app lifecyle. Change-Id: Ia238b43cb971fde42a92eab4f8247286d2e2d247
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions