Fix errors
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s

This commit is contained in:
Florian RICHER 2024-11-20 20:08:31 +01:00
parent 1dc9da0d61
commit 2590db0a06
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
8 changed files with 123 additions and 88 deletions

View file

@ -10,14 +10,18 @@ pub struct VkCommandPool {
}
impl VkCommandPool {
pub fn new(device: Arc<VkDevice>) -> VkResult<Self> {
let command_pool_info = vk::CommandPoolCreateInfo::default()
.queue_family_index(device.queue_family_index);
let command_pool = unsafe { device.handle.create_command_pool(&command_pool_info, None)? };
pub fn new(device: &Arc<VkDevice>) -> VkResult<Self> {
let command_pool_info =
vk::CommandPoolCreateInfo::default().queue_family_index(device.queue_family_index);
let command_pool = unsafe {
device
.handle
.create_command_pool(&command_pool_info, None)?
};
log::debug!("Command pool created ({command_pool:?})");
Ok(Self {
device,
device: device.clone(),
handle: command_pool,
})
}
@ -28,4 +32,4 @@ impl Drop for VkCommandPool {
unsafe { self.device.handle.destroy_command_pool(self.handle, None) };
log::debug!("Command pool destroyed ({:?})", self.handle);
}
}
}