make ash version more flexible

This commit is contained in:
Alex Janka 2023-10-02 13:17:01 +11:00
parent 9f6e5aaac2
commit c5aac6615a
4 changed files with 70 additions and 24 deletions

View file

@ -12,23 +12,38 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all."
[lib]
crate-type = [ "cdylib", "staticlib" ]
crate-type = ["cdylib", "staticlib"]
[features]
default = ["runtime-all" ]
runtime-all = ["runtime-opengl", "runtime-d3d11", "runtime-d3d12", "runtime-vulkan"]
default = ["runtime-all"]
runtime-all = [
"runtime-opengl",
"runtime-d3d11",
"runtime-d3d12",
"runtime-vulkan",
]
runtime-opengl = ["gl", "librashader/runtime-gl"]
runtime-d3d11 = ["windows", "librashader/runtime-d3d11", "windows/Win32_Graphics_Direct3D11"]
runtime-d3d12 = ["windows", "librashader/runtime-d3d12", "windows/Win32_Graphics_Direct3D12"]
runtime-d3d11 = [
"windows",
"librashader/runtime-d3d11",
"windows/Win32_Graphics_Direct3D11",
]
runtime-d3d12 = [
"windows",
"librashader/runtime-d3d12",
"windows/Win32_Graphics_Direct3D12",
]
runtime-vulkan = ["ash", "librashader/runtime-vk"]
[dependencies]
librashader = { path = "../librashader", version = "0.1.4", features = ["internal"] }
librashader = { path = "../librashader", version = "0.1.4", features = [
"internal",
] }
thiserror = "1.0.37"
paste = "1.0.9"
gl = { version = "0.14.0", optional = true }
rustc-hash = "1.1.0"
ash = { version = "0.37.2+1.3.238", optional = true }
ash = { version = "0.37", optional = true }
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }
[target.'cfg(windows)'.dependencies.windows]

View file

@ -21,7 +21,7 @@ vulkan = ["ash"]
[dependencies]
gl = { version = "0.14.0", optional = true }
ash = { version = "0.37.1+1.3.235", optional = true }
ash = { version = "0.37", optional = true }
num-traits = "0.2.15"

View file

@ -14,19 +14,24 @@ description = "RetroArch shaders for all."
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
librashader-common = { path = "../librashader-common", features = ["vulkan"], version = "0.1.4" }
librashader-common = { path = "../librashader-common", features = [
"vulkan",
], version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = [] }
librashader-runtime = { path = "../librashader-runtime" , version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = [
] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4" }
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }
rustc-hash = "1.1.0"
bytemuck = "1.12.3"
thiserror = "1.0.37"
ash = { version = "0.37.1+1.3.235", features = ["linked", "debug"] }
gpu-allocator = { version = "0.22.0", default-features = false, features = ["vulkan"] }
ash = { version = "0.37", features = ["linked", "debug"] }
gpu-allocator = { version = "0.22.0", default-features = false, features = [
"vulkan",
] }
parking_lot = "0.12.1"
rayon = "1.6.1"

View file

@ -16,16 +16,18 @@ description = "RetroArch shaders for all."
librashader-common = { path = "../librashader-common", version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["standalone"] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11", version = "0.1.4", optional = true }
librashader-runtime-d3d12 = { path = "../librashader-runtime-d3d12", version = "0.1.4", optional = true }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = [
"standalone",
] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11", version = "0.1.4", optional = true }
librashader-runtime-d3d12 = { path = "../librashader-runtime-d3d12", version = "0.1.4", optional = true }
librashader-runtime-gl = { path = "../librashader-runtime-gl", version = "0.1.4", optional = true }
librashader-runtime-vk = { path = "../librashader-runtime-vk", version = "0.1.4", optional = true }
librashader-cache = { path = "../librashader-cache", version = "0.1.4" }
ash = { version = "0.37.1+1.3.235", optional = true }
ash = { version = "0.37", optional = true }
[target.'cfg(windows)'.dependencies.windows]
version = "0.48.0"
@ -39,10 +41,34 @@ preprocess = []
presets = []
# runtimes
runtime-gl = [ "runtime", "reflect-cross", "librashader-common/opengl", "librashader-runtime-gl" ]
runtime-d3d11 = [ "runtime", "reflect-cross","librashader-common/d3d11", "librashader-runtime-d3d11", "windows/Win32_Graphics_Direct3D11" ]
runtime-d3d12 = [ "runtime", "reflect-cross", "reflect-dxil", "librashader-common/d3d12", "librashader-runtime-d3d12", "windows/Win32_Graphics_Direct3D12" ]
runtime-vk = ["runtime", "reflect-cross", "librashader-common/vulkan", "librashader-runtime-vk", "ash" ]
runtime-gl = [
"runtime",
"reflect-cross",
"librashader-common/opengl",
"librashader-runtime-gl",
]
runtime-d3d11 = [
"runtime",
"reflect-cross",
"librashader-common/d3d11",
"librashader-runtime-d3d11",
"windows/Win32_Graphics_Direct3D11",
]
runtime-d3d12 = [
"runtime",
"reflect-cross",
"reflect-dxil",
"librashader-common/d3d12",
"librashader-runtime-d3d12",
"windows/Win32_Graphics_Direct3D12",
]
runtime-vk = [
"runtime",
"reflect-cross",
"librashader-common/vulkan",
"librashader-runtime-vk",
"ash",
]
# reflection
reflect-cross = ["reflect", "librashader-reflect/cross"]
@ -52,7 +78,7 @@ runtime-all = ["runtime-gl", "runtime-d3d11", "runtime-d3d12", "runtime-vk"]
reflect-all = ["reflect-cross", "reflect-dxil"]
# enable all features by default
default = [ "full" ]
default = ["full"]
internal = []
full = ["runtime-all", "reflect-all", "preprocess", "presets"]
@ -62,4 +88,4 @@ docsrs = ["librashader-cache/docsrs"]
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"]
features = [ "librashader-cache/docsrs" ]
features = ["librashader-cache/docsrs"]