Remove holes from wgpu-info

This commit is contained in:
Connor Fitzgerald
2021-06-23 21:29:44 -04:00
parent cfb84748bf
commit 9377149e85
2 changed files with 6 additions and 7 deletions

View File

@@ -23,7 +23,9 @@ fn print_info_from_adapter(adapter: &wgpu::Adapter, idx: usize) {
for i in 0..(size_of::<wgpu::Features>() * 8) {
let bit = wgpu::Features::from_bits(1 << i as u64);
if let Some(bit) = bit {
println!("\t\t{:<44} {}", format!("{:?}:", bit), features.contains(bit));
if wgpu::Features::all().contains(bit) {
println!("\t\t{:<44} {}", format!("{:?}:", bit), features.contains(bit));
}
}
}
println!("\tLimits:");
@@ -74,7 +76,9 @@ fn print_info_from_adapter(adapter: &wgpu::Adapter, idx: usize) {
for i in 0..(size_of::<wgpu::DownlevelFlags>() * 8) {
let bit = wgpu::DownlevelFlags::from_bits(1 << i as u64);
if let Some(bit) = bit {
println!("\t\t{:<36} {}", format!("{:?}:", bit), flags.contains(bit));
if wgpu::DownlevelFlags::all().contains(bit) {
println!("\t\t{:<36} {}", format!("{:?}:", bit), flags.contains(bit));
}
}
}
}

View File

@@ -602,11 +602,6 @@ bitflags::bitflags! {
///
/// This is a native only feature.
const SPIRV_SHADER_PASSTHROUGH = 0x0000_0400_0000_0000;
/// Features which are part of the upstream WebGPU standard.
const ALL_WEBGPU = 0x0000_0000_0000_FFFF;
/// Features that are only available when targeting native (not web).
const ALL_NATIVE = 0xFFFF_FFFF_FFFF_0000;
}
}