mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Add dawn version hash to cache keys.
Motivation is to simplify cache evicting by reusing the LRU to evict stale entries from older Dawn versions since there isn't already a simple cache busting solution. The dawn version will just be pushed into the cache keys instead so old version entries will eventually be retired. - Removes the fingerprint from the GetCachingInterface API on DawnNative. - Adds the "fingerprint", which was just the hash, to the device;s cache key directly instead. Bug: dawn:549 Change-Id: I573aa03a2bb96dfe044293b1176d3a7746725572 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94140 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <unordered_set>
|
||||
|
||||
#include "dawn/common/Log.h"
|
||||
#include "dawn/common/Version_autogen.h"
|
||||
#include "dawn/native/Adapter.h"
|
||||
#include "dawn/native/AsyncTask.h"
|
||||
#include "dawn/native/AttachmentState.h"
|
||||
@@ -208,7 +209,7 @@ DeviceBase::DeviceBase(AdapterBase* adapter, const DeviceDescriptor* descriptor)
|
||||
// Record the cache key from the properties. Note that currently, if a new extension
|
||||
// descriptor is added (and probably handled here), the cache key recording needs to be
|
||||
// updated.
|
||||
mDeviceCacheKey.Record(adapterProperties, mEnabledFeatures.featuresBitSet,
|
||||
mDeviceCacheKey.Record(kDawnVersion, adapterProperties, mEnabledFeatures.featuresBitSet,
|
||||
mEnabledToggles.toggleBitset, cacheDesc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user