-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow WebGPU & WebGL in same wasm and detect WebGPU availability (#5044)
* Rename backends: web -> webgpu, direct -> wgpu_core * rename context objects for web & core * allow webgpu & webgl features side-by-side * make sure webgl ci doesn't use webgpu * update any_backend_feature_enabled * add panicing generate_report method for compatibility * RequestDeviceErrorKind::Web rename, fixup various cfg attributes * automatic webgpu support detection * changelog entry * fix emscripten * fix weird cfg, fix comment typo * remove try_generate_report again * Make get_mapped_range_as_array_buffer WebGPU only again
- Loading branch information
Showing
15 changed files
with
291 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#[cfg(webgpu)] | ||
mod web; | ||
mod webgpu; | ||
#[cfg(webgpu)] | ||
pub(crate) use web::Context; | ||
pub(crate) use webgpu::{get_browser_gpu_property, ContextWebGpu}; | ||
|
||
#[cfg(not(webgpu))] | ||
mod direct; | ||
#[cfg(not(webgpu))] | ||
pub(crate) use direct::Context; | ||
#[cfg(wgpu_core)] | ||
mod wgpu_core; | ||
#[cfg(wgpu_core)] | ||
pub(crate) use wgpu_core::ContextWgpuCore; |
Oops, something went wrong.