mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-15 21:34:21 +00:00
Print adapter info
This commit is contained in:
15
src/lib.rs
15
src/lib.rs
@ -156,6 +156,21 @@ impl State {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
let adapter_info = adapter.get_info();
|
||||||
|
|
||||||
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
|
{
|
||||||
|
println!("GPU: {}", adapter_info.name);
|
||||||
|
println!("RHI: {:?}", adapter_info.backend);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "wasm32")]
|
||||||
|
{
|
||||||
|
use web_sys::console;
|
||||||
|
console::log_1(&format!("GPU: {}", adapter_info.name).into());
|
||||||
|
console::log_1(&format!("RHI: {:?}", adapter_info.backend).into());
|
||||||
|
}
|
||||||
|
|
||||||
let (device, queue) = adapter
|
let (device, queue) = adapter
|
||||||
.request_device(
|
.request_device(
|
||||||
&wgpu::DeviceDescriptor {
|
&wgpu::DeviceDescriptor {
|
||||||
|
Reference in New Issue
Block a user