mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2025-02-20 11:03:10 +00:00
The submit module now uses UnsyncedCommandBuffer
This commit is contained in:
parent
2971b867be
commit
211039c0ae
@ -231,6 +231,17 @@ impl<L, P> UnsyncedCommandBuffer<L, P> where L: CommandsList, P: CommandPool {
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<L, P> VulkanObject for UnsyncedCommandBuffer<L, P>
|
||||
where P: CommandPool
|
||||
{
|
||||
type Object = vk::CommandBuffer;
|
||||
|
||||
#[inline]
|
||||
fn internal_object(&self) -> vk::CommandBuffer {
|
||||
self.cmd
|
||||
}
|
||||
}
|
||||
|
||||
// Helper object for UnsyncedCommandBuffer. Implementation detail.
|
||||
struct Sink<'a>(&'a mut RawCommandBufferPrototype<'a>, &'a Arc<Device>);
|
||||
impl<'a> CommandsListSink<'a> for Sink<'a> {
|
||||
|
@ -62,11 +62,11 @@ use sync::Semaphore;
|
||||
|
||||
use vk;
|
||||
|
||||
pub mod cb;
|
||||
pub mod cmd;
|
||||
pub mod pool;
|
||||
pub mod sys;
|
||||
|
||||
mod cb;
|
||||
mod submit;
|
||||
|
||||
#[repr(C)]
|
||||
|
@ -15,8 +15,8 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use command_buffer::cb::UnsyncedCommandBuffer;
|
||||
use command_buffer::pool::CommandPool;
|
||||
use command_buffer::sys::UnsafeCommandBuffer;
|
||||
use device::Device;
|
||||
use device::Queue;
|
||||
use sync::Fence;
|
||||
@ -262,8 +262,8 @@ impl<'a> SubmitBuilder<'a> {
|
||||
/// that builds this `SubmitBuilder`. Consequently keeping the `Submit` object alive is enough
|
||||
/// to guarantee that the command buffer is kept alive as well.
|
||||
#[inline]
|
||||
pub fn add_command_buffer<P>(self, command_buffer: &'a UnsafeCommandBuffer<P>)
|
||||
-> SubmitBuilder<'a>
|
||||
pub fn add_command_buffer<L, P>(self, command_buffer: &'a UnsyncedCommandBuffer<L, P>)
|
||||
-> SubmitBuilder<'a>
|
||||
where P: CommandPool
|
||||
{
|
||||
self.add_command_buffer_raw(command_buffer.internal_object())
|
||||
|
Loading…
Reference in New Issue
Block a user