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"
checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046"
[[package]]
name = "addr2line"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
dependencies = [
"gimli",
]
[[package]]
name = "adler"
version = "1.0.2"
@ -198,21 +189,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
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]]
name = "base64"
version = "0.13.1"
@ -1068,12 +1044,6 @@ dependencies = [
"weezl",
]
[[package]]
name = "gimli"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "gl"
version = "0.14.0"
@ -1197,24 +1167,13 @@ dependencies = [
"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]]
name = "gpu-allocator"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884"
dependencies = [
"ash",
"log",
"presser",
"thiserror",
@ -1758,7 +1717,7 @@ dependencies = [
"ash-window",
"bytemuck",
"glfw 0.49.1",
"gpu-allocator 0.22.0",
"gpu-allocator",
"librashader-cache",
"librashader-common",
"librashader-preprocess",
@ -2145,15 +2104,6 @@ dependencies = [
"cc",
]
[[package]]
name = "object"
version = "0.32.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
version = "1.19.0"
@ -2651,12 +2601,6 @@ dependencies = [
"ordered-multimap",
]
[[package]]
name = "rustc-demangle"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
[[package]]
name = "rustc-hash"
version = "1.1.0"
@ -3433,7 +3377,7 @@ dependencies = [
"glow",
"glutin_wgl_sys",
"gpu-alloc",
"gpu-allocator 0.25.0",
"gpu-allocator",
"gpu-descriptor",
"hassle-rs",
"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"] }
thiserror = "1.0.37"
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"
rayon = "1.6.1"
array-concat = "0.5.2"

View file

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

View file

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