From 10532bfa758bce42127f931d6e965fba53158221 Mon Sep 17 00:00:00 2001 From: 180watt <180watt@duck.com> Date: Mon, 29 Jul 2024 03:09:38 -0400 Subject: [PATCH] Add support for FreeBSD Just a few cfg changes to allow vulkan rendering on FreeBSD. --- blade-graphics/Cargo.toml | 2 +- blade-graphics/src/lib.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blade-graphics/Cargo.toml b/blade-graphics/Cargo.toml index 70ad7485..1144c9ce 100644 --- a/blade-graphics/Cargo.toml +++ b/blade-graphics/Cargo.toml @@ -26,7 +26,7 @@ metal = "0.29" objc = "0.2.5" naga = { workspace = true, features = ["msl-out"] } -[target.'cfg(any(vulkan, windows, target_os = "linux", target_os = "android"))'.dependencies] +[target.'cfg(any(vulkan, windows, target_os = "linux", target_os = "android", target_os = "freebsd"))'.dependencies] ash = "0.38" ash-window = "0.13" gpu-alloc = "0.6" diff --git a/blade-graphics/src/lib.rs b/blade-graphics/src/lib.rs index dc7b3720..61bea5eb 100644 --- a/blade-graphics/src/lib.rs +++ b/blade-graphics/src/lib.rs @@ -55,7 +55,7 @@ pub mod derive; #[cfg_attr( all( not(gles), - any(vulkan, windows, target_os = "linux", target_os = "android") + any(vulkan, windows, target_os = "linux", target_os = "android", target_os = "freebsd") ), path = "vulkan/mod.rs" )] @@ -90,12 +90,12 @@ pub struct ContextDesc { pub enum NotSupportedError { #[cfg(all( not(gles), - any(vulkan, windows, target_os = "linux", target_os = "android") + any(vulkan, windows, target_os = "linux", target_os = "android", target_os = "freebsd") ))] VulkanLoadingError(ash::LoadingError), #[cfg(all( not(gles), - any(vulkan, windows, target_os = "linux", target_os = "android") + any(vulkan, windows, target_os = "linux", target_os = "android", target_os = "freebsd") ))] VulkanError(ash::vk::Result),