dawn-cmake/generator/templates/dawn/native
Le Hoang Quyen 7971bfe16f Add an option to enable implicit device synchronization.
1. Auto-generate mutex locking code in DawnNative's ProcTable's
functions. Using a mutex owned by the related Device.
  - Unless the function/class has "no autolock" attribute (new) in
  dawn.json. In which cases, no locking code will be auto-generated.
  - Currently Instance, Adapter, Surface, Encoder classes and
  Reference/Release method have "no autolock".

2. Added Feature::ImplicitDeviceSynchronization to enable Device's
mutex.
  - If this feature is disabled, lock/unlock Device's mutex is no-op.
  Auto-generated locking code will have no effect. This is the default.
  - This approach is used instead of generating two sets of ProcTable
  because it's cleaner and the internal code doesn't need to care about
  whether there is a mutex being locked or not. Furthermore, if there
  were two sets of ProcTable, and user used dawnProcSetProcs() to set
  global ProcTable, it would affect all other modules using different
  Devices. Even though those modules don't need thread safety.

Bug: dawn:1662
Change-Id: I75f0d28959f333318e4159916b259131581f79f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119940
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-04-05 19:35:07 +00:00
..
ChainUtils.cpp Support optional query on adapter power preference 2022-09-23 00:29:46 +00:00
ChainUtils.h Support optional query on adapter power preference 2022-09-23 00:29:46 +00:00
ObjectType.cpp tint->dawn: Move src/dawn_native -> src/dawn/native 2022-02-04 17:07:46 +00:00
ObjectType.h tint->dawn: Move src/dawn_native -> src/dawn/native 2022-02-04 17:07:46 +00:00
ProcTable.cpp Add an option to enable implicit device synchronization. 2023-04-05 19:35:07 +00:00
ValidationUtils.cpp Merge DAWN_FORMAT_VALIDATION_ERROR in DAWN_VALIDATION_ERROR. 2022-08-30 13:39:47 +00:00
ValidationUtils.h tint->dawn: Move src/dawn_native -> src/dawn/native 2022-02-04 17:07:46 +00:00
api_StreamImpl.cpp Use SubstituteOverride transform to implement overrides 2022-09-07 20:09:54 +00:00
api_absl_format.cpp Adds strformat code-gen for helping auto-generate readable strings for structs. 2022-03-19 00:21:48 +00:00
api_absl_format.h Adds strformat code-gen for helping auto-generate readable strings for structs. 2022-03-19 00:21:48 +00:00
api_dawn_native_proc.cpp Convert all dawn includes to use non-system include syntax. 2022-04-19 14:24:04 +00:00
api_structs.cpp tint->dawn: Move src/dawn_native -> src/dawn/native 2022-02-04 17:07:46 +00:00
api_structs.h Declare nextInChain as ChainedStructOut when extensible is out 2022-09-10 01:38:59 +00:00
dawn_platform.h Adds To/FromAPI calls for wgpu (C++) namespace structs. 2023-02-17 22:40:13 +00:00