Skip to content

Commit

Permalink
Add static molten vk for macos (v1.2.6).
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupeyy committed Jan 14, 2025
1 parent 8313293 commit 1577406
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
brew install pkg-config autoconf automake || true
# for ffmpeg
brew install ffmpeg || true
# for building molten vk
brew install python-setuptools || true
- name: Prepare msys dependencies
if: contains(matrix.os, 'windows')
Expand Down
36 changes: 35 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions lib/graphics-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ log = "0.4.22"
either = "1.13.0"
replace_with = "0.1.7"
crossbeam = "0.8.4"
futures = "0.3.31"

[target.'cfg(target_os = "macos")'.dependencies]
ash-molten = { git = "https://github.com/Jupeyy/ash-molten", branch = "ddnet_moltenvk" }

#[cfg(test)]
[dev-dependencies]
base-http = { path = "../base-http" }
futures = "0.3.31"

3 changes: 3 additions & 0 deletions lib/graphics-backend/src/backends/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ impl Instance {
display_requirements: &BackendDisplayRequirements,
dbg_mode: GfxDebugModes,
) -> anyhow::Result<Arc<Self>> {
#[cfg(not(target_os = "macos"))]
let entry = unsafe { ash::Entry::load() }?;
#[cfg(target_os = "macos")]
let entry = ash_molten::load();

let extensions = &display_requirements.extensions;

Expand Down

0 comments on commit 1577406

Please sign in to comment.