1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/community/wluma/link-vulkan-at-runtime.patch
2025-04-28 20:23:56 +00:00

36 lines
1.1 KiB
Diff

From: Jakub Jirutka <jakub@jirutka.cz>
Date: Thu, 10 Feb 2022 20:16:00 +0100
Subject: [PATCH] Link vulkan-loader at runtime
Link vulkan-loader at runtime instead of build-time to make it optional
(it's used only for `capturer = "wlroots"`).
--- a/src/frame/vulkan.rs
+++ b/src/frame/vulkan.rs
@@ -44,7 +44,7 @@
vk::KhrGetPhysicalDeviceProperties2Fn::name().as_ptr(),
];
- let entry = Entry::linked();
+ let entry = unsafe { Entry::load()? };
let create_info = vk::InstanceCreateInfo::builder()
.application_info(&app_info)
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14 +14 @@
-ash = { version = "~0.38", features = ["linked"], default-features = false }
+ash = { version = "~0.38", features = ["loaded"], default-features = false }
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -102,6 +102,9 @@
version = "0.38.0+1.3.281"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f"
+dependencies = [
+ "libloading",
+]
[[package]]
name = "autocfg"