rollback vulkano

This commit is contained in:
galister
2024-09-21 06:42:14 +09:00
parent 6af5623fa7
commit 8d35b45c2b
3 changed files with 47 additions and 39 deletions

41
Cargo.lock generated
View File

@@ -225,11 +225,11 @@ checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
[[package]]
name = "ash"
version = "0.38.0+1.3.281"
version = "0.37.3+1.3.251"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f"
checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a"
dependencies = [
"libloading",
"libloading 0.7.4",
]
[[package]]
@@ -789,7 +789,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
dependencies = [
"glob",
"libc",
"libloading",
"libloading 0.8.5",
]
[[package]]
@@ -1264,7 +1264,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
dependencies = [
"libloading",
"libloading 0.8.5",
]
[[package]]
@@ -2031,6 +2031,16 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "libloading"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
]
[[package]]
name = "libloading"
version = "0.8.5"
@@ -2671,7 +2681,7 @@ version = "0.18.0"
source = "git+https://github.com/galister/openxrs?rev=af4a55d#af4a55df60125491c80c61464c824219c6019b76"
dependencies = [
"libc",
"libloading",
"libloading 0.8.5",
"ndk-context",
"openxr-sys",
]
@@ -3472,12 +3482,6 @@ dependencies = [
"autocfg",
]
[[package]]
name = "slabbin"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8305086044614627ed85432d27b87cf9fc047204eaa036a11de6cf0120f273"
[[package]]
name = "slice-of-array"
version = "0.3.2"
@@ -3908,7 +3912,7 @@ dependencies = [
[[package]]
name = "vulkano"
version = "0.34.0"
source = "git+https://github.com/vulkano-rs/vulkano?rev=b9f3e89#b9f3e893005078b5680cd1672037465a2b5f3133"
source = "git+https://github.com/vulkano-rs/vulkano?rev=94f50f1#94f50f18bd25971ea123adb8b5782ad65a8f085c"
dependencies = [
"ahash",
"ash",
@@ -3918,17 +3922,16 @@ dependencies = [
"half",
"heck 0.4.1",
"indexmap 2.3.0",
"libloading",
"nom",
"libloading 0.8.5",
"objc",
"once_cell",
"parking_lot",
"proc-macro2",
"quote",
"raw-window-handle",
"regex",
"serde",
"serde_json",
"slabbin",
"smallvec",
"thread_local",
"vk-parse",
@@ -3938,7 +3941,7 @@ dependencies = [
[[package]]
name = "vulkano-macros"
version = "0.34.0"
source = "git+https://github.com/vulkano-rs/vulkano?rev=b9f3e89#b9f3e893005078b5680cd1672037465a2b5f3133"
source = "git+https://github.com/vulkano-rs/vulkano?rev=94f50f1#94f50f18bd25971ea123adb8b5782ad65a8f085c"
dependencies = [
"proc-macro-crate 2.0.2",
"proc-macro2",
@@ -3949,7 +3952,7 @@ dependencies = [
[[package]]
name = "vulkano-shaders"
version = "0.34.0"
source = "git+https://github.com/vulkano-rs/vulkano?rev=b9f3e89#b9f3e893005078b5680cd1672037465a2b5f3133"
source = "git+https://github.com/vulkano-rs/vulkano?rev=94f50f1#94f50f18bd25971ea123adb8b5782ad65a8f085c"
dependencies = [
"ahash",
"heck 0.4.1",
@@ -4644,7 +4647,7 @@ dependencies = [
"as-raw-xcb-connection",
"gethostname",
"libc",
"libloading",
"libloading 0.8.5",
"once_cell",
"rustix",
"x11rb-protocol",

View File

@@ -11,7 +11,7 @@ edition = "2021"
[dependencies]
anyhow = "1.0.86"
ash = "^0.38.0"
ash = "^0.37.2"
chrono = "0.4.38"
chrono-tz = "0.9.0"
clap = { version = "4.5.6", features = ["derive"] }
@@ -53,8 +53,8 @@ smallvec = "1.13.2"
strum = { version = "0.26.2", features = ["derive"] }
sysinfo = { version = "0.31.2" }
thiserror = "1.0.61"
vulkano = { git = "https://github.com/vulkano-rs/vulkano", rev = "b9f3e89" }
vulkano-shaders = { git = "https://github.com/vulkano-rs/vulkano", rev = "b9f3e89" }
vulkano = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
vulkano-shaders = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
wlx-capture = { git = "https://github.com/galister/wlx-capture", tag = "v0.3.13", default-features = false }
libmonado-rs = { git = "https://github.com/technobaboo/libmonado-rs", rev = "a495f6d", optional = true }
winit = { version = "0.30.0", optional = true }

View File

@@ -44,8 +44,8 @@ use vulkano::{
allocator::StandardDescriptorSetAllocator, DescriptorSet, WriteDescriptorSet,
},
device::{
physical::PhysicalDevice, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
Queue, QueueCreateInfo, QueueFlags,
physical::PhysicalDevice, Device, DeviceCreateInfo, DeviceExtensions, Features, Queue,
QueueCreateInfo, QueueFlags,
},
format::Format,
image::{
@@ -195,7 +195,7 @@ impl WlxGraphics {
let target_version = vulkano::Version::V1_3;
let library = get_vulkan_library();
let vk_app_info_raw = vk::ApplicationInfo::default()
let vk_app_info_raw = vk::ApplicationInfo::builder()
.application_version(0)
.engine_version(0)
.api_version(vk_target_version);
@@ -205,7 +205,7 @@ impl WlxGraphics {
.create_vulkan_instance(
system,
get_instance_proc_addr,
&vk::InstanceCreateInfo::default()
&vk::InstanceCreateInfo::builder()
.application_info(&vk_app_info_raw)
.enabled_extension_names(&instance_extensions_raw)
as *const _ as *const _,
@@ -286,23 +286,25 @@ impl WlxGraphics {
})
.collect::<Vec<_>>();
let features = DeviceFeatures {
let features = Features {
dynamic_rendering: true,
..Default::default()
};
let queue_priorities = [1.0];
let queue_create_infos = [vk::DeviceQueueCreateInfo::default()
let queue_create_infos = [vk::DeviceQueueCreateInfo::builder()
.queue_family_index(queue_family_index)
.queue_priorities(&queue_priorities)];
.queue_priorities(&queue_priorities)
.build()];
let mut device_create_info = vk::DeviceCreateInfo::default()
let mut device_create_info = vk::DeviceCreateInfo::builder()
.queue_create_infos(&queue_create_infos)
.enabled_extension_names(&device_extensions_raw);
.enabled_extension_names(&device_extensions_raw)
.build();
let mut dynamic_rendering =
PhysicalDeviceDynamicRenderingFeatures::default().dynamic_rendering(true);
PhysicalDeviceDynamicRenderingFeatures::builder().dynamic_rendering(true);
dynamic_rendering.p_next = device_create_info.p_next as _;
device_create_info.p_next = (&mut dynamic_rendering) as *const _ as *const c_void;
@@ -487,9 +489,9 @@ impl WlxGraphics {
physical_device,
DeviceCreateInfo {
enabled_extensions: my_extensions,
enabled_features: DeviceFeatures {
enabled_features: Features {
dynamic_rendering: true,
..DeviceFeatures::empty()
..Features::empty()
},
queue_create_infos: vec![QueueCreateInfo {
queue_family_index,
@@ -625,9 +627,9 @@ impl WlxGraphics {
physical_device,
DeviceCreateInfo {
enabled_extensions: my_extensions,
enabled_features: DeviceFeatures {
enabled_features: Features {
dynamic_rendering: true,
..DeviceFeatures::empty()
..Features::empty()
},
queue_create_infos: vec![QueueCreateInfo {
queue_family_index,
@@ -1034,7 +1036,10 @@ impl WlxGraphics {
(fns.v1_0.queue_submit)(
self.queue.handle(),
1,
[SubmitInfo::default().command_buffers(&[command_buffer.handle()])].as_ptr(),
[SubmitInfo::builder()
.command_buffers(&[command_buffer.handle()])
.build()]
.as_ptr(),
fence.handle(),
)
}
@@ -1186,7 +1191,7 @@ impl WlxPipeline<WlxPipelineDynamic> {
let vep = vert.entry_point("main").unwrap(); // want panic
let fep = frag.entry_point("main").unwrap(); // want panic
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep)?;
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep.info().input_interface)?;
let stages = smallvec![
vulkano::pipeline::PipelineShaderStageCreateInfo::new(vep),
@@ -1343,7 +1348,7 @@ impl WlxPipeline<WlxPipelineLegacy> {
let vep = vert.entry_point("main").unwrap(); // want panic
let fep = frag.entry_point("main").unwrap(); // want panic
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep)?;
let vertex_input_state = Vert2Uv::per_vertex().definition(&vep.info().input_interface)?;
let stages = smallvec![
vulkano::pipeline::PipelineShaderStageCreateInfo::new(vep),