static molten-vk
This commit is contained in:
parent
f023073cab
commit
71bb9f8e6d
5 changed files with 78 additions and 3 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -6,3 +6,6 @@
|
|||
path = vendored/baseview
|
||||
url = https://github.com/italicsjenga/baseview
|
||||
branch = raw-window-handle-0.5.0
|
||||
[submodule "vendored/ash-molten"]
|
||||
path = vendored/ash-molten
|
||||
url = https://github.com/italicsjenga/ash-molten
|
||||
|
|
54
Cargo.lock
generated
54
Cargo.lock
generated
|
@ -201,6 +201,16 @@ dependencies = [
|
|||
"libloading 0.7.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ash-molten"
|
||||
version = "0.15.0+1.2.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ash",
|
||||
"plist",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ash-window"
|
||||
version = "0.12.0"
|
||||
|
@ -1231,6 +1241,7 @@ dependencies = [
|
|||
"nokhwa",
|
||||
"raw-window-handle",
|
||||
"send_wrapper",
|
||||
"serde",
|
||||
"winit",
|
||||
"winit_input_helper",
|
||||
]
|
||||
|
@ -1240,6 +1251,7 @@ name = "gb-emu-lib"
|
|||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"ash",
|
||||
"ash-molten",
|
||||
"ash-window",
|
||||
"async-ringbuf",
|
||||
"bytemuck",
|
||||
|
@ -1865,6 +1877,15 @@ dependencies = [
|
|||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "line-wrap"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9"
|
||||
dependencies = [
|
||||
"safemem",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.4.8"
|
||||
|
@ -2619,6 +2640,20 @@ dependencies = [
|
|||
"dirs-next",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "plist"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"indexmap 1.9.3",
|
||||
"line-wrap",
|
||||
"quick-xml",
|
||||
"serde",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.17.10"
|
||||
|
@ -2669,6 +2704,15 @@ version = "1.0.11"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f89dff0959d98c9758c88826cc002e2c3d0b9dfac4139711d1f30de442f1139b"
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.29.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.33"
|
||||
|
@ -2889,9 +2933,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.15"
|
||||
version = "0.38.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531"
|
||||
checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"errno",
|
||||
|
@ -2915,6 +2959,12 @@ dependencies = [
|
|||
"bytemuck",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "safemem"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
|
|
|
@ -7,10 +7,13 @@ edition = "2021"
|
|||
default = ["vulkan"]
|
||||
pixels = ["gb-emu-lib/pixels-renderer"]
|
||||
vulkan = ["dep:raw-window-handle", "gb-emu-lib/vulkan-renderer"]
|
||||
vulkan-static = ["gb-emu-lib/vulkan-static"]
|
||||
camera = ["dep:nokhwa", "dep:send_wrapper"]
|
||||
|
||||
[dependencies]
|
||||
gb-emu-lib = { path = "../lib", default-features = false }
|
||||
gb-emu-lib = { path = "../lib", default-features = false, features = [
|
||||
"config",
|
||||
] }
|
||||
clap = { version = "4.4", features = ["derive"] }
|
||||
gilrs = "0.10"
|
||||
cpal = "0.15"
|
||||
|
@ -23,3 +26,4 @@ send_wrapper = { version = "0.6.0", optional = true }
|
|||
winit = "0.28"
|
||||
winit_input_helper = "0.14"
|
||||
raw-window-handle = { version = "0.5", optional = true }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
@ -13,7 +13,9 @@ vulkan-renderer = [
|
|||
"dep:naga",
|
||||
"dep:librashader",
|
||||
]
|
||||
vulkan-static = ["dep:ash-molten", "vulkan-renderer"]
|
||||
pixels-renderer = ["dep:pixels"]
|
||||
config = ["dep:directories", "dep:ron"]
|
||||
|
||||
[dependencies]
|
||||
rand = "0.8.5"
|
||||
|
@ -31,6 +33,11 @@ raw-window-handle = { version = "0.5", optional = true }
|
|||
librashader = { version = "0.1", optional = true, default-features = false, features = [
|
||||
"runtime-vk",
|
||||
] }
|
||||
directories = { version = "5.0", optional = true }
|
||||
ron = { version = "0.8", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
naga = { version = "0.13", optional = true, features = ["wgsl-in", "spv-out"] }
|
||||
|
||||
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
|
||||
ash-molten = { path = "../vendored/ash-molten", optional = true }
|
||||
|
|
|
@ -32,7 +32,17 @@ pub struct RendererBackendManager {
|
|||
|
||||
impl RendererBackendManager {
|
||||
pub fn new(display_handle: RawDisplayHandle) -> Self {
|
||||
#[cfg(all(
|
||||
any(target_os = "macos", target_os = "ios"),
|
||||
target_feature = "vulkan-static"
|
||||
))]
|
||||
let entry = ash_molten::load();
|
||||
#[cfg(not(all(
|
||||
any(target_os = "macos", target_os = "ios"),
|
||||
target_feature = "vulkan-static"
|
||||
)))]
|
||||
let entry = Entry::linked();
|
||||
|
||||
let name = std::ffi::CString::new("gameboy").unwrap();
|
||||
|
||||
let mut extension_names = enumerate_required_extensions(display_handle)
|
||||
|
@ -41,6 +51,7 @@ impl RendererBackendManager {
|
|||
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||
{
|
||||
#[cfg(not(target_feature = "vulkan-static"))]
|
||||
extension_names.push(vk::KhrPortabilityEnumerationFn::name().as_ptr());
|
||||
extension_names.push(vk::KhrGetPhysicalDeviceProperties2Fn::name().as_ptr());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue