Vulkan Command pool optimization (#3065)

This commit is contained in:
Mauro Gentile 2022-10-05 22:36:18 +02:00 committed by GitHub
parent 26f223964e
commit 7b8dd4e0bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,7 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
let _ = self
.device
.raw
.reset_command_pool(self.raw, vk::CommandPoolResetFlags::RELEASE_RESOURCES);
.reset_command_pool(self.raw, vk::CommandPoolResetFlags::default());
}
unsafe fn transition_buffers<'a, T>(&mut self, barriers: T)

View File

@ -1059,6 +1059,7 @@ impl crate::Device<super::Api> for super::Device {
) -> Result<super::CommandEncoder, crate::DeviceError> {
let vk_info = vk::CommandPoolCreateInfo::builder()
.queue_family_index(desc.queue.family_index)
.flags(vk::CommandPoolCreateFlags::TRANSIENT)
.build();
let raw = self.shared.raw.create_command_pool(&vk_info, None)?;