render: remove TextureReservations
This commit is contained in:
parent
300deecc7d
commit
ea4a1f027b
20 changed files with 198 additions and 172 deletions
|
|
@ -1,5 +1,8 @@
|
|||
use {
|
||||
crate::gfx_apis::vulkan::{device::VulkanDevice, VulkanError},
|
||||
crate::{
|
||||
gfx_api::SyncFile,
|
||||
gfx_apis::vulkan::{device::VulkanDevice, VulkanError},
|
||||
},
|
||||
ash::vk::{
|
||||
ExportFenceCreateInfo, ExternalFenceHandleTypeFlags, Fence, FenceCreateInfo,
|
||||
FenceGetFdInfoKHR,
|
||||
|
|
@ -38,12 +41,12 @@ impl VulkanDevice {
|
|||
}
|
||||
|
||||
impl VulkanFence {
|
||||
pub fn export_syncfile(&self) -> Result<Rc<OwnedFd>, VulkanError> {
|
||||
pub fn export_sync_file(&self) -> Result<SyncFile, VulkanError> {
|
||||
let info = FenceGetFdInfoKHR::builder()
|
||||
.fence(self.fence)
|
||||
.handle_type(ExternalFenceHandleTypeFlags::SYNC_FD);
|
||||
let res = unsafe { self.device.external_fence_fd.get_fence_fd(&info) };
|
||||
res.map_err(VulkanError::ExportSyncFile)
|
||||
.map(|fd| Rc::new(OwnedFd::new(fd)))
|
||||
.map(|fd| SyncFile(Rc::new(OwnedFd::new(fd))))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue