rt(vk): update gpu-allocator

This commit is contained in:
chyyran 2024-02-16 00:24:23 -05:00 committed by Ronny Chan
parent ba6c32e858
commit b47b27fadb
4 changed files with 8 additions and 60 deletions

62
Cargo.lock generated
View file

@ -18,15 +18,6 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046"
[[package]]
name = "addr2line"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
dependencies = [
"gimli",
]
[[package]] [[package]]
name = "adler" name = "adler"
version = "1.0.2" version = "1.0.2"
@ -198,21 +189,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
dependencies = [
"addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
]
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.13.1" version = "0.13.1"
@ -1068,12 +1044,6 @@ dependencies = [
"weezl", "weezl",
] ]
[[package]]
name = "gimli"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]] [[package]]
name = "gl" name = "gl"
version = "0.14.0" version = "0.14.0"
@ -1197,24 +1167,13 @@ dependencies = [
"bitflags 2.4.2", "bitflags 2.4.2",
] ]
[[package]]
name = "gpu-allocator"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8"
dependencies = [
"ash",
"backtrace",
"log",
"thiserror",
]
[[package]] [[package]]
name = "gpu-allocator" name = "gpu-allocator"
version = "0.25.0" version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884"
dependencies = [ dependencies = [
"ash",
"log", "log",
"presser", "presser",
"thiserror", "thiserror",
@ -1758,7 +1717,7 @@ dependencies = [
"ash-window", "ash-window",
"bytemuck", "bytemuck",
"glfw 0.49.1", "glfw 0.49.1",
"gpu-allocator 0.22.0", "gpu-allocator",
"librashader-cache", "librashader-cache",
"librashader-common", "librashader-common",
"librashader-preprocess", "librashader-preprocess",
@ -2145,15 +2104,6 @@ dependencies = [
"cc", "cc",
] ]
[[package]]
name = "object"
version = "0.32.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "once_cell" name = "once_cell"
version = "1.19.0" version = "1.19.0"
@ -2651,12 +2601,6 @@ dependencies = [
"ordered-multimap", "ordered-multimap",
] ]
[[package]]
name = "rustc-demangle"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
[[package]] [[package]]
name = "rustc-hash" name = "rustc-hash"
version = "1.1.0" version = "1.1.0"
@ -3433,7 +3377,7 @@ dependencies = [
"glow", "glow",
"glutin_wgl_sys", "glutin_wgl_sys",
"gpu-alloc", "gpu-alloc",
"gpu-allocator 0.25.0", "gpu-allocator",
"gpu-descriptor", "gpu-descriptor",
"hassle-rs", "hassle-rs",
"js-sys", "js-sys",

View file

@ -24,7 +24,7 @@ librashader-cache = { path = "../librashader-cache", version = "0.2.0-rc.2" }
bytemuck = { version = "1.12.3", features = ["derive"] } bytemuck = { version = "1.12.3", features = ["derive"] }
thiserror = "1.0.37" thiserror = "1.0.37"
ash = { version = "0.37", features = ["debug"] } ash = { version = "0.37", features = ["debug"] }
gpu-allocator = { version = "0.22.0", default-features = false, features = ["vulkan"] } gpu-allocator = { version = "0.25.0", default-features = false, features = ["vulkan"] }
parking_lot = "0.12.1" parking_lot = "0.12.1"
rayon = "1.6.1" rayon = "1.6.1"
array-concat = "0.5.2" array-concat = "0.5.2"

View file

@ -3,6 +3,7 @@ use gpu_allocator::vulkan::{Allocator, AllocatorCreateDesc};
use parking_lot::RwLock; use parking_lot::RwLock;
use std::sync::Arc; use std::sync::Arc;
use gpu_allocator::AllocationSizes;
use crate::error; use crate::error;
use crate::error::FilterChainError; use crate::error::FilterChainError;
@ -101,6 +102,7 @@ pub fn create_allocator(
physical_device, physical_device,
debug_settings: Default::default(), debug_settings: Default::default(),
buffer_device_address: false, buffer_device_address: false,
allocation_sizes: AllocationSizes::default(),
})?; })?;
Ok(Arc::new(RwLock::new(alloc))) Ok(Arc::new(RwLock::new(alloc)))
} }

View file

@ -3,6 +3,7 @@ use gpu_allocator::vulkan::{Allocator, AllocatorCreateDesc};
use parking_lot::RwLock; use parking_lot::RwLock;
use std::sync::Arc; use std::sync::Arc;
use gpu_allocator::AllocationSizes;
#[inline(always)] #[inline(always)]
pub unsafe fn vulkan_image_layout_transition_levels( pub unsafe fn vulkan_image_layout_transition_levels(
@ -56,6 +57,7 @@ pub fn create_allocator(
physical_device, physical_device,
debug_settings: Default::default(), debug_settings: Default::default(),
buffer_device_address: false, buffer_device_address: false,
allocation_sizes: AllocationSizes::default()
}) })
.unwrap(); .unwrap();
Arc::new(RwLock::new(alloc)) Arc::new(RwLock::new(alloc))