Memory leak fix for SamplingRoutine cache
- The SamplingRoutine cache is now owned by the Device and
has the same lifetime as the device, which means it gets
released when the device gets released.
- Added a utility class, SamplingRoutineCache, to contain
the cache and release all routine entries upon destruction.
- Added a pointer to the current device in the sampler object
in order to retrieve it during sampling, in order to access
the routine cache
- The cache is now internally an LRUCache, so it can't cache
a large quantity of routines and take up a lot of memory.
Bug b/129523279 b/137649247 b/137524292 chromium:971325
Change-Id: If4ff1fbc87962355d0a281b9d0acace4316a02b8
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32688Tested-by:
Alexis Hétu <sugoi@google.com>
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Reviewed-by:
Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Showing
Please
register
or
sign in
to comment