Skip to content

Commit

Permalink
Add support for FreeBSD
Browse files Browse the repository at this point in the history
Just a few cfg changes to allow vulkan rendering on FreeBSD.
  • Loading branch information
180watt committed Aug 4, 2024
1 parent 407a04b commit 48b5d4c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion blade-graphics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 21 additions & 3 deletions blade-graphics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ pub mod derive;
#[cfg_attr(
all(
not(gles),

Check warning on line 57 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 57 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 57 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 57 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

unexpected `cfg` condition name: `gles`

Check warning on line 57 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `gles`

Check warning on line 57 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `gles`

Check warning on line 57 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Web, ubuntu-latest, wasm32-unknown-unknown)

unexpected `cfg` condition name: `gles`
any(vulkan, windows, target_os = "linux", target_os = "android")
any(
vulkan,

Check warning on line 59 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 59 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 59 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 59 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

unexpected `cfg` condition name: `vulkan`

Check warning on line 59 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `vulkan`

Check warning on line 59 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `vulkan`

Check warning on line 59 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Web, ubuntu-latest, wasm32-unknown-unknown)

unexpected `cfg` condition name: `vulkan`
windows,
target_os = "linux",
target_os = "android",
target_os = "freebsd"
)
),
path = "vulkan/mod.rs"
)]
Expand Down Expand Up @@ -90,12 +96,24 @@ pub struct ContextDesc {
pub enum NotSupportedError {
#[cfg(all(
not(gles),

Check warning on line 98 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 98 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 98 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 98 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

unexpected `cfg` condition name: `gles`

Check warning on line 98 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `gles`

Check warning on line 98 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `gles`

Check warning on line 98 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Web, ubuntu-latest, wasm32-unknown-unknown)

unexpected `cfg` condition name: `gles`
any(vulkan, windows, target_os = "linux", target_os = "android")
any(
vulkan,

Check warning on line 100 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 100 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 100 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 100 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

unexpected `cfg` condition name: `vulkan`

Check warning on line 100 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `vulkan`

Check warning on line 100 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `vulkan`

Check warning on line 100 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Web, ubuntu-latest, wasm32-unknown-unknown)

unexpected `cfg` condition name: `vulkan`
windows,
target_os = "linux",
target_os = "android",
target_os = "freebsd"
)
))]
VulkanLoadingError(ash::LoadingError),
#[cfg(all(
not(gles),

Check warning on line 109 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 109 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 109 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `gles`

Check warning on line 109 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

unexpected `cfg` condition name: `gles`

Check warning on line 109 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `gles`

Check warning on line 109 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `gles`

Check warning on line 109 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Web, ubuntu-latest, wasm32-unknown-unknown)

unexpected `cfg` condition name: `gles`
any(vulkan, windows, target_os = "linux", target_os = "android")
any(
vulkan,

Check warning on line 111 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 111 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 111 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

unexpected `cfg` condition name: `vulkan`

Check warning on line 111 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

unexpected `cfg` condition name: `vulkan`

Check warning on line 111 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `vulkan`

Check warning on line 111 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

unexpected `cfg` condition name: `vulkan`

Check warning on line 111 in blade-graphics/src/lib.rs

View workflow job for this annotation

GitHub Actions / build (Web, ubuntu-latest, wasm32-unknown-unknown)

unexpected `cfg` condition name: `vulkan`
windows,
target_os = "linux",
target_os = "android",
target_os = "freebsd"
)
))]
VulkanError(ash::vk::Result),

Expand Down

0 comments on commit 48b5d4c

Please sign in to comment.