From 9377149e85007d906e793cb15ec23d70fac93692 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Wed, 23 Jun 2021 21:29:44 -0400 Subject: [PATCH] Remove holes from wgpu-info --- wgpu-info/src/main.rs | 8 ++++++-- wgpu-types/src/lib.rs | 5 ----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/wgpu-info/src/main.rs b/wgpu-info/src/main.rs index 14df81e554..0f79cfd745 100644 --- a/wgpu-info/src/main.rs +++ b/wgpu-info/src/main.rs @@ -23,7 +23,9 @@ fn print_info_from_adapter(adapter: &wgpu::Adapter, idx: usize) { for i in 0..(size_of::() * 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::() * 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)); + } } } } diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 81e403cbb7..8455888181 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -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; } }