diff --git a/piet-gpu-hal/src/hub.rs b/piet-gpu-hal/src/hub.rs index 2ad9651..3238376 100644 --- a/piet-gpu-hal/src/hub.rs +++ b/piet-gpu-hal/src/hub.rs @@ -528,7 +528,7 @@ impl From for RetainResource { } } -impl<'a, T: Into> From<&'a T> for RetainResource { +impl<'a, T: Clone + Into> From<&'a T> for RetainResource { fn from(resource: &'a T) -> Self { resource.clone().into() } diff --git a/piet-gpu-hal/src/lib.rs b/piet-gpu-hal/src/lib.rs index 323f5e5..ed27dd5 100644 --- a/piet-gpu-hal/src/lib.rs +++ b/piet-gpu-hal/src/lib.rs @@ -172,15 +172,6 @@ pub trait Device: Sized { /// All submitted commands that refer to this query pool must have completed. unsafe fn fetch_query_pool(&self, pool: &Self::QueryPool) -> Result, Error>; - #[deprecated] - unsafe fn run_cmd_buf( - &self, - cmd_buf: &Self::CmdBuf, - wait_semaphores: &[Self::Semaphore], - signal_semaphores: &[Self::Semaphore], - fence: Option<&Self::Fence>, - ) -> Result<(), Error>; - unsafe fn run_cmd_bufs( &self, cmd_buf: &[&Self::CmdBuf], diff --git a/piet-gpu-hal/src/vulkan.rs b/piet-gpu-hal/src/vulkan.rs index 959e330..94772e5 100644 --- a/piet-gpu-hal/src/vulkan.rs +++ b/piet-gpu-hal/src/vulkan.rs @@ -701,40 +701,6 @@ impl crate::Device for VkDevice { Ok(result) } - /// Run the command buffer. - /// - /// This submits the command buffer for execution. The provided fence - /// is signalled when the execution is complete. - unsafe fn run_cmd_buf( - &self, - cmd_buf: &CmdBuf, - wait_semaphores: &[Self::Semaphore], - signal_semaphores: &[Self::Semaphore], - fence: Option<&Self::Fence>, - ) -> Result<(), Error> { - let device = &self.device.device; - - let fence = match fence { - Some(fence) => *fence, - None => vk::Fence::null(), - }; - let wait_stages = wait_semaphores - .iter() - .map(|_| vk::PipelineStageFlags::ALL_COMMANDS) - .collect::>(); - device.queue_submit( - self.queue, - &[vk::SubmitInfo::builder() - .command_buffers(&[cmd_buf.cmd_buf]) - .wait_semaphores(wait_semaphores) - .wait_dst_stage_mask(&wait_stages) - .signal_semaphores(signal_semaphores) - .build()], - fence, - )?; - Ok(()) - } - /// Run the command buffers. /// /// This submits the command buffer for execution. The provided fence