Skip to content

Commit 8a6ca6d

Browse files
committed
Remove dummy::Context in favor of hal::api::Empty
1 parent 4fc2d9f commit 8a6ca6d

File tree

4 files changed

+7
-1550
lines changed

4 files changed

+7
-1550
lines changed

wgpu-core/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ define_backend_caller! { gfx_if_vulkan, gfx_if_vulkan_hidden, "vulkan" if all(fe
221221
define_backend_caller! { gfx_if_metal, gfx_if_metal_hidden, "metal" if all(feature = "metal", any(target_os = "macos", target_os = "ios")) }
222222
define_backend_caller! { gfx_if_dx12, gfx_if_dx12_hidden, "dx12" if all(feature = "dx12", windows) }
223223
define_backend_caller! { gfx_if_gles, gfx_if_gles_hidden, "gles" if feature = "gles" }
224+
define_backend_caller! { gfx_if_empty, gfx_if_empty_hidden, "empty" if all(
225+
not(any(feature = "metal", feature = "vulkan", feature = "gles")),
226+
any(target_os = "macos", target_os = "ios"),
227+
) }
224228

225229
/// Dispatch on an [`Id`]'s backend to a backend-generic method.
226230
///
@@ -275,6 +279,7 @@ macro_rules! gfx_select {
275279
wgt::Backend::Metal => $crate::gfx_if_metal!($global.$method::<$crate::api::Metal>( $($param),* )),
276280
wgt::Backend::Dx12 => $crate::gfx_if_dx12!($global.$method::<$crate::api::Dx12>( $($param),* )),
277281
wgt::Backend::Gl => $crate::gfx_if_gles!($global.$method::<$crate::api::Gles>( $($param),+ )),
282+
wgt::Backend::Empty => $crate::gfx_if_empty!($global.$method::<$crate::api::Empty>( $($param),+ )),
278283
other => panic!("Unexpected backend {:?}", other),
279284
}
280285
};

0 commit comments

Comments
 (0)