From 377cad76a9551e276fa786492712b87f0daa015c Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Sat, 4 Jan 2025 17:07:43 -0500 Subject: [PATCH] Remove Hello Example --- examples/features/src/hello/README.md | 20 --------------- examples/features/src/hello/mod.rs | 36 --------------------------- 2 files changed, 56 deletions(-) delete mode 100644 examples/features/src/hello/README.md delete mode 100644 examples/features/src/hello/mod.rs diff --git a/examples/features/src/hello/README.md b/examples/features/src/hello/README.md deleted file mode 100644 index 1d51a6b83b..0000000000 --- a/examples/features/src/hello/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# hello - -This example prints output describing the adapter in use. - -## To Run - -``` -cargo run --bin wgpu-examples hello -``` - -## Example output - -``` -# You might see different output as it depends on your graphics card and drivers -Available adapters: - AdapterInfo { name: "AMD RADV VEGA10", vendor: 4098, device: 26751, device_type: DiscreteGpu, backend: Vulkan } - AdapterInfo { name: "llvmpipe (LLVM 12.0.0, 256 bits)", vendor: 65541, device: 0, device_type: Cpu, backend: Vulkan } - AdapterInfo { name: "Radeon RX Vega (VEGA10, DRM 3.41.0, 5.13.0-52-generic, LLVM 12.0.0)", vendor: 4098, device: 0, device_type: Other, backend: Gl } -Selected adapter: AdapterInfo { name: "AMD RADV VEGA10", vendor: 4098, device: 26751, device_type: DiscreteGpu, backend: Vulkan } -``` diff --git a/examples/features/src/hello/mod.rs b/examples/features/src/hello/mod.rs deleted file mode 100644 index ba6ea2553f..0000000000 --- a/examples/features/src/hello/mod.rs +++ /dev/null @@ -1,36 +0,0 @@ -/// This example shows how to describe the adapter in use. -async fn run() { - let adapter = { - let instance = wgpu::Instance::default(); - #[cfg(not(target_arch = "wasm32"))] - { - log::info!("Available adapters:"); - for a in instance.enumerate_adapters(wgpu::Backends::all()) { - log::info!(" {:?}", a.get_info()) - } - } - instance - .request_adapter(&wgpu::RequestAdapterOptions::default()) - .await - .unwrap() - }; - - log::info!("Selected adapter: {:?}", adapter.get_info()) -} - -pub fn main() { - #[cfg(not(target_arch = "wasm32"))] - { - env_logger::builder() - .filter(Some(module_path!()), log::LevelFilter::Info) - .parse_default_env() - .init(); - pollster::block_on(run()); - } - #[cfg(target_arch = "wasm32")] - { - std::panic::set_hook(Box::new(console_error_panic_hook::hook)); - console_log::init().expect("could not initialize logger"); - wasm_bindgen_futures::spawn_local(run()); - } -}