Adds device-side cache key generation.

- Note that the device-side cache key will be prepended to object cache keys to prevent incompatible adapter/device cache clashes.
- Adds a new template file to auto=generate these cache serializers based on arguments.

Bug: dawn:549
Change-Id: I24b9d11eb38c579acfcc173a5dced9e1b649cf2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86081
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
Loko Kung
2022-04-12 23:50:56 +00:00
committed by Dawn LUCI CQ
parent 792873ecb6
commit c083d65a0c
7 changed files with 160 additions and 26 deletions

View File

@@ -955,6 +955,10 @@ class MultiGeneratorFromDawnJSON(Generator):
FileRender('dawn/native/ObjectType.cpp',
'src/' + native_dir + '/ObjectType_autogen.cpp',
frontend_params))
renders.append(
FileRender('dawn/native/CacheKey.cpp',
'src/' + native_dir + '/CacheKey_autogen.cpp',
frontend_params))
if 'wire' in targets:
params_dawn_wire = parse_json(loaded_json,