Merge pull request #429 from tomaka/indirect-fixes

Fixes in indirect drawing
This commit is contained in:
tomaka 2017-04-23 17:16:37 +02:00 committed by GitHub
commit 9c53b101a8
2 changed files with 3 additions and 3 deletions

View File

@ -162,6 +162,7 @@ pass_through!((S, D), commands_raw::CmdCopyBuffer<S, D>);
pass_through!((S, D), commands_raw::CmdCopyBufferToImage<S, D>);
pass_through!((), commands_raw::CmdDrawRaw);
pass_through!((), commands_raw::CmdDrawIndexedRaw);
pass_through!((B), commands_raw::CmdDrawIndirectRaw<B>);
pass_through!((), commands_raw::CmdEndRenderPass);
pass_through!((C), commands_raw::CmdExecuteCommands<C>);
pass_through!((B), commands_raw::CmdFillBuffer<B>);

View File

@ -204,14 +204,13 @@ pub unsafe trait CommandBufferBuilder: DeviceOwned {
///
/// Can only be used from inside a render pass.
#[inline]
fn draw_indirect<P, S, Pc, V, B, I, O>(self, pipeline: P, dynamic: DynamicState,
fn draw_indirect<P, S, Pc, V, B, O>(self, pipeline: P, dynamic: DynamicState,
vertices: V, indirect_buffer: B, sets: S, push_constants: Pc) -> Result<O, CommandAddError>
where Self: Sized + AddCommand<commands_extra::CmdDrawIndirect<V, B::Access, P, S, Pc>, Out = O>,
S: DescriptorSetsCollection,
P: VertexSource<V> + GraphicsPipelineAbstract + Clone,
B: Buffer,
B::Access: TypedBuffer<Content = [DrawIndirectCommand]>,
I: Index + 'static
B::Access: TypedBuffer<Content = [DrawIndirectCommand]>
{
let cmd = commands_extra::CmdDrawIndirect::new(pipeline, dynamic, vertices, indirect_buffer.access(),
sets, push_constants);