mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Adds new chained struct for device creation to specify cache options.
- Adds isolation key option, DawnNative support, and relevant unit tests. Bug: dawn:549 Change-Id: I16344581c7956ce8576c0a4c14655fbdb4e15a54 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/81920 Reviewed-by: Shrek Shao <shrekshao@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
@@ -184,6 +184,12 @@ namespace dawn::native {
|
||||
}
|
||||
ApplyFeatures(descriptor);
|
||||
|
||||
const DawnCacheDeviceDescriptor* cacheDesc = nullptr;
|
||||
FindInChain(descriptor->nextInChain, &cacheDesc);
|
||||
if (cacheDesc != nullptr) {
|
||||
mCacheIsolationKey = cacheDesc->isolationKey;
|
||||
}
|
||||
|
||||
if (descriptor->requiredLimits != nullptr) {
|
||||
mLimits.v1 = ReifyDefaultLimits(descriptor->requiredLimits->limits);
|
||||
} else {
|
||||
@@ -1738,6 +1744,10 @@ namespace dawn::native {
|
||||
return PipelineCompatibilityToken(mNextPipelineCompatibilityToken++);
|
||||
}
|
||||
|
||||
const std::string& DeviceBase::GetCacheIsolationKey() const {
|
||||
return mCacheIsolationKey;
|
||||
}
|
||||
|
||||
const std::string& DeviceBase::GetLabel() const {
|
||||
return mLabel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user