Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libvulkan on macOS not found #5

Open
def- opened this issue Jan 2, 2025 · 8 comments
Open

libvulkan on macOS not found #5

def- opened this issue Jan 2, 2025 · 8 comments

Comments

@def-
Copy link
Member

def- commented Jan 2, 2025

I have libvulkan in /opt/homebrew/opt/vulkan-loader/lib/, but still seeing:

[2025-01-02T16:41:08Z INFO  graphics_backend::backend_thread] graphics backend thread exited: dlopen(libvulkan.dylib, 0x0005): tried: 'libvulkan.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibvulkan.dylib' (no such file), '/usr/lib/libvulkan.dylib' (no such file, not in dyld cache), 'libvulkan.dylib' (no such file)
@Jupeyy
Copy link
Member

Jupeyy commented Jan 2, 2025

Ah thanks for trying, macos defs needs some love, since I cannot test it.

ash has a feature called linked (https://docs.rs/crate/ash/latest/features)
Maybe we'd need to enable that for macos, since I assume this libvulkan.dylib comes from your brew installation anyway?

If you want to try out
ash = { version = "0.38.0", features = ["linked"] }
lib/graphics-backend/Cargo.toml

Else they also mention macos here:
https://github.com/ash-rs/ash?tab=readme-ov-file#macos

@def-
Copy link
Member Author

def- commented Jan 2, 2025

Works by manually putting libMoltenVK.dylib as libvulkan.dylib next to ddnet-rs

After ~2 seconds of seeing the menu I get a pink screen.

In the logs one time is UTC, the other localtime:

[2025-01-02T16:49:59Z INFO  fs] Found config dir in "/Users/deen/Library/Application Support/org.DDNet-Rs-Alpha"
[2025-01-02T16:49:59Z INFO  graphics_backend::backends::vulkan::phy_device] Vulkan 1.2.296 (driver: 0.2.2019), Apple
[2025-01-02T16:49:59Z INFO  fs-watch] could not watch directory/file: No such file or directory (os error 2)
2025-01-02 17:49:59.988 ddnet-rs[4133:773887] +[IMKClient subclass]: chose IMKClient_Modern

@Jupeyy
Copy link
Member

Jupeyy commented Jan 2, 2025

Mh ok, since vulkan support wasn't great on ddnet either for macos, maybe we hit some weirdness of moltenvk again.

Generally a WGPU backend is planned which would have native metal support

@Jupeyy
Copy link
Member

Jupeyy commented Jan 2, 2025

https://github.com/KhronosGroup/MoltenVK/issues/2220 sound very related. If you can easily downgrade, maybe worth a try

@M0REKZ
Copy link

M0REKZ commented Jan 6, 2025

If you do brew install molten-vk you get a libMoltenVK.dylib alias instead of libvulkan.dylib at /opt/homebrew/lib/ so i think the app should also try searching libMoltenVK.dylib

Sadly i also get the pink screen with both local build and CI build

@Jupeyy
Copy link
Member

Jupeyy commented Jan 6, 2025

Does

brew install [email protected]

not work on macOS?

The issue I mentioned tells that earlier versions worked correctly.
Besides that on ddnet we also have other issues with molten-vk, so it's not said this will help

@M0REKZ
Copy link

M0REKZ commented Jan 6, 2025

brew:
Warning: No available formula with the name "[email protected]". Did you mean molten-vk?

Downloaded MoltenVK 1.2.6 from https://github.com/KhronosGroup/MoltenVK/releases/tag/v1.2.6 and renamed to libvulkan.dylib, seems to work, i get mouse stuck when pausing in game (esc key) so i need to kill the app xD

screenshot
screen2

@Jupeyy
Copy link
Member

Jupeyy commented Jan 14, 2025

i get mouse stuck when pausing in game (esc key) so i need to kill the app xD

I hope I fixed that with #62 by making the grab modes have a fallback since macOS does not support confined cursors with winit apparently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants