-
-
Notifications
You must be signed in to change notification settings - Fork 556
core: emdawnwebgpu build support #4370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,20 @@ if(NOT MLN_WITH_WEBGPU) | |
| return() | ||
| endif() | ||
|
|
||
| if(MLN_WEBGPU_EMDAWN) | ||
| message(STATUS "Configuring emdawnwebgpu (host supplies --use-port=emdawnwebgpu)") | ||
| add_library(mbgl-vendor-dawn INTERFACE) | ||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This branch creates Useful? React with 👍 / 👎. |
||
| set_target_properties( | ||
| mbgl-vendor-dawn | ||
| PROPERTIES | ||
| INTERFACE_MAPLIBRE_NAME "emdawnwebgpu" | ||
| INTERFACE_MAPLIBRE_URL "https://dawn.googlesource.com/dawn" | ||
| INTERFACE_MAPLIBRE_AUTHOR "Chromium Dawn Team" | ||
| INTERFACE_MAPLIBRE_LICENSE "${PROJECT_SOURCE_DIR}/vendor/dawn/LICENSE" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sargunv can you address this? |
||
| ) | ||
| return() | ||
| endif() | ||
|
|
||
| if(POLICY CMP0169) | ||
| cmake_policy(SET CMP0169 OLD) | ||
| endif() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For emdawn builds this target only asks the host to provide the port, but it never requires Asyncify/JSPI. The same build still takes the Dawn readback path in
OffscreenTextureResource::readStillImage()and callswgpuBufferMapAsyncwithWGPUCallbackMode_WaitAnyOnlyfollowed bywgpuInstanceWaitAny, so browser snapshot/readback paths need a stack-switching mode to synchronously wait on the JavaScript promise; without adding-sASYNCIFY=1/-sJSPI=1or disabling this sync path for emdawn, those calls can trap or hang at runtime instead of returning pixels.Useful? React with 👍 / 👎.