* Fix validation error when configuring the surface on WebGL
* Remove unneeded `webgl` feature
* Fix compilation of the `noop` backend on `wasm32`
* Prevent `webgpu` examples from incorrectly falling back to WebGL
* Reduce dependency set when building wasm examples
* Fix various warnings
With the only caveat that device creation will now panic if the `wgsl` feature is not enabled, `InstanceFlags::VALIDATION_INDIRECT_CALL` is set and the device supports `DownlevelFlags::INDIRECT_EXECUTION`.
This will help users determine whether the problem is:
* a backend is not statically enabled
* a backend is not dynamically enabled
* no drivers or physical adapters are present for that backend
(further distinction would be useful here)
* no adapters met the required criteria
There are deficiencies in the reporting of WebGPU vs. WebGL support.
Those would best be fixed by also fixing the mutual exclusion of those
backends.
This allows `wgpu` to not unconditionally depend on `std::path::Path`.
It’s also, in my opinion, more user-friendly, because the feature which
most users will not use (and is not currently functional) is now a
defaultable struct field instead of a required parameter.
The disadvantage is that `wgpu-types` now has to know about tracing.
* Make `wgpu_core::snatch::LockTrace` fully instead of partially conditional.
Now, when `cfg(not(debug_assertions))`, there is no `SNATCH_LOCK_TRACE`
thread local, and `LockTrace` has no data fields.
* Make `std` usage optional for `wgpu-core`.
Adds a `std` feature, enabled by default, to `wgpu-core`. When that
feature is disabled, the following functionality is not available:
* `Send + Sync` for resources.
* `trace` feature.
* `observe_locks` feature.
* Snatch lock recursive locking assertion.
* Add basic drm support to vulkan backend
* Move vulkan drm implementation to its own module
* Properly feature gate drm support and add safety docs
* Disable drm on wasm targets
* Remove old fixme comment from vulkan drm backend
* Move cfg check inside drm module
* Use expect instead of allow for create_surface_from_drm
* Document that drm is not available on apple platforms
This allows `wgpu-hal` to be used in `no_std` environments, except that
currently, only the `noop` backend supports `no_std`.
In the future, `cfg(all(gles, webgl))` should also be `no_std`, but that
requires further work.
Co-Authored_by: Kevin Reid <kpreid@switchb.org>
Dependencies on `std` that still exist:
* Locks
* `std::error::Error` (waiting for Rust 1.81)
* `std::os::raw::c_char` for FFI
* `thread_local` and `Backtrace` in `snatch`