dawn-cmake/generator
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
..
templates Add an option to enable implicit device synchronization. 2023-04-05 19:35:07 +00:00
CMakeLists.txt CMake: tweak third-party imports. 2022-05-16 09:11:21 +00:00
dawn_generator.gni Add Dawn Wire Server LPM Fuzzer [1/N] 2023-02-08 20:43:18 +00:00
dawn_gpu_info_generator.py Make adapter info device matching more flexible 2022-08-02 22:14:35 +00:00
dawn_json_generator.py Add an option to enable implicit device synchronization. 2023-04-05 19:35:07 +00:00
dawn_version_generator.py Fix incorrect indentation in version generator script. 2022-06-23 01:14:24 +00:00
extract_json.py Avoid unnecessary recompiles with code generators. 2021-03-23 19:06:02 +00:00
generator_lib.gni BUILD.gn: Make toolchain.ninja not contain system absolute paths. 2022-11-22 11:07:27 +00:00
generator_lib.py generator_lib.py: Fix exception when racing for dir creation. 2022-12-19 11:14:54 +00:00
opengl_loader_generator.py Dawn: Break dependency on ANGLE 2023-03-16 14:31:25 +00:00