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

Can't load libvulkan in Linux Mint 19.2 #24

Open
ItEndsWithTens opened this issue Sep 20, 2019 · 2 comments
Open

Can't load libvulkan in Linux Mint 19.2 #24

ItEndsWithTens opened this issue Sep 20, 2019 · 2 comments

Comments

@ItEndsWithTens
Copy link

ItEndsWithTens commented Sep 20, 2019

I got a report yesterday from another developer about one of my projects, which uses Veldrid, explaining that it failed when attempting to use Vulkan in Linux. His system supports it, but the exception thrown said it failed to load 'libvulkan.so', which was nowhere to be found. I've just confirmed it myself using the same distro, Linux Mint 19.2.

Apparently the issue is in vk/Commands.cs, in the GetVulkanName method, where it checks the condition

RuntimeInformation.OSDescription.Contains("Unix")

to determine if it's running in Android. I'm sorry to say that in Mint 19.2, OSDescription shows Unix 4.15.0.64, which throws off the check. In the meantime we can of course make symlinks to serve our development purposes, but out in the wild the program would fall back to OpenGL even on systems that supported Vulkan, and, you know, yuck.

Without Android experience of my own, I can't say I know any more robust methods to distinguish Android from regular desktop Linux, but I did notice that RuntimeInformation.FrameworkDescription, at least when running the program in question, contains the string Mono, if that's worth anything. Then again I'm targeting the full .NET framework, with Mono supporting the software in Linux and macOS, so a .NET Core app couldn't rely on that string being there, I guess.

EDIT: I caught a case of Temporary Big Dumb Idiot syndrome earlier (haha, "temporary") and forgot to check the Veldrid library itself. Just poking around now I see it too has a use of OSDescription to detect Android. I believe that would need to be updated too, to prevent a false negative when using IsBackendSupported. It doesn't seem worth opening a separate issue on the Veldrid repo for tracking purposes, but if you'd rather I do so I'll be happy to.

@mellinoe
Copy link
Owner

The GetVulkanName function can definitely be improved. I’ll try to set aside some time to implement and test that this weekend.

@philstopford
Copy link

Was this tackled? Curious about the current status.

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