Please CI

This commit is contained in:
Connor Fitzgerald 2021-06-22 01:38:41 -04:00
parent c0664c2bb7
commit 18ac365f79
2 changed files with 14 additions and 1 deletions

View File

@ -133,7 +133,10 @@ jobs:
- if: matrix.clippy_params != ''
run: cargo clippy ${{ matrix.clippy_params }}
- if: matrix.channel == 'nightly'
run: cargo test -- --nocapture
run: cargo test -p wgpu-core -- --nocapture
- if: matrix.channel == 'nightly'
run: cargo run --example wgpu-info -- cargo test -p wgpu -- --nocapture
docs:
runs-on: [ubuntu-latest]

View File

@ -37,6 +37,7 @@ pub fn power_preference_from_env() -> Option<PowerPreference> {
}
/// Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable.
#[cfg(not(target_arch = "wasm32"))]
pub fn initialize_adapter_from_env(
instance: &Instance,
backend_bits: BackendBit,
@ -61,6 +62,15 @@ pub fn initialize_adapter_from_env(
Some(chosen_adapter.expect("WGPU_ADAPTER_NAME set but no matching adapter found!"))
}
/// Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable.
#[cfg(target_arch = "wasm32")]
pub fn initialize_adapter_from_env(
_instance: &Instance,
_backend_bits: BackendBit,
) -> Option<Adapter> {
None
}
/// Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable and if it doesn't exist fall back on a default adapter.
pub async fn initialize_adapter_from_env_or_default(
instance: &Instance,