1
0
Fork 0
forked from wry/wry

wayland: implement linux-drm-syncobj-v1

This commit is contained in:
Julian Orth 2024-03-21 20:54:21 +01:00
parent 816315170f
commit aaf73d6fdc
29 changed files with 1507 additions and 35 deletions

View file

@ -10,7 +10,10 @@ use {
util::OnDrop,
VulkanError,
},
video::{drm::Drm, gbm::GbmDevice},
video::{
drm::{sync_obj::SyncObjCtx, Drm},
gbm::GbmDevice,
},
},
ahash::AHashMap,
arrayvec::ArrayVec,
@ -43,6 +46,7 @@ pub struct VulkanDevice {
pub(super) physical_device: PhysicalDevice,
pub(super) render_node: Rc<CString>,
pub(super) gbm: GbmDevice,
pub(super) sync_ctx: Rc<SyncObjCtx>,
pub(super) instance: Rc<VulkanInstance>,
pub(super) device: Device,
pub(super) external_memory_fd: ExternalMemoryFd,
@ -279,6 +283,7 @@ impl VulkanInstance {
Ok(Rc::new(VulkanDevice {
physical_device: phy_dev,
render_node,
sync_ctx: Rc::new(SyncObjCtx::new(gbm.drm.fd())),
gbm,
instance: self.clone(),
device,

View file

@ -574,6 +574,7 @@ impl VulkanRenderer {
.map_err(|e| VulkanError::Dupfd(e.into()))?;
import_sync_file(fd)?;
}
AcquireSync::Unnecessary => {}
}
}
Ok(())