mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
Cleanup
Fix bound on blanket RetainResource impl. Clean up run_cmd_buf.
This commit is contained in:
parent
22935fccc6
commit
174c81ec09
|
@ -528,7 +528,7 @@ impl From<Image> for RetainResource {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T: Into<RetainResource>> From<&'a T> for RetainResource {
|
||||
impl<'a, T: Clone + Into<RetainResource>> From<&'a T> for RetainResource {
|
||||
fn from(resource: &'a T) -> Self {
|
||||
resource.clone().into()
|
||||
}
|
||||
|
|
|
@ -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<Vec<f64>, 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],
|
||||
|
|
|
@ -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::<Vec<_>>();
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue