This commit is contained in:
parent
1dc9da0d61
commit
2590db0a06
8 changed files with 123 additions and 88 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue