1
0
Fork 0
forked from wry/wry

vulkan: add an async allocator

This commit is contained in:
Julian Orth 2024-09-07 17:38:12 +02:00
parent fe8238421f
commit 37fb45df00
6 changed files with 335 additions and 72 deletions

View file

@ -42,6 +42,7 @@ use {
std::{
ffi::{CStr, CString},
rc::Rc,
sync::Arc,
},
uapi::Ustr,
};
@ -52,7 +53,7 @@ pub struct VulkanDevice {
pub(super) gbm: Rc<GbmDevice>,
pub(super) sync_ctx: Rc<SyncObjCtx>,
pub(super) instance: Rc<VulkanInstance>,
pub(super) device: Device,
pub(super) device: Arc<Device>,
pub(super) external_memory_fd: external_memory_fd::Device,
pub(super) external_semaphore_fd: external_semaphore_fd::Device,
pub(super) external_fence_fd: external_fence_fd::Device,
@ -292,7 +293,7 @@ impl VulkanInstance {
sync_ctx: Rc::new(SyncObjCtx::new(gbm.drm.fd())),
gbm: Rc::new(gbm),
instance: self.clone(),
device,
device: Arc::new(device),
external_memory_fd,
external_semaphore_fd,
external_fence_fd,