mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-26 00:34:19 +00:00
Fix passing a stride of 0 for draw_indirect
This commit is contained in:
parent
5d9e298ec3
commit
e9e86fcebc
@ -299,7 +299,8 @@ impl<P> AutoCommandBufferBuilder<P> {
|
||||
descriptor_sets(&mut self.inner, true, pipeline.clone(), sets);
|
||||
vertex_buffers(&mut self.inner, &pipeline, vertices);
|
||||
|
||||
self.inner.draw_indirect(indirect_buffer, draw_count, 0);
|
||||
self.inner.draw_indirect(indirect_buffer, draw_count,
|
||||
mem::size_of::<DrawIndirectCommand>() as u32);
|
||||
Ok(self)
|
||||
}
|
||||
}
|
||||
|
@ -626,6 +626,9 @@ impl<P> UnsafeCommandBufferBuilder<P> {
|
||||
{
|
||||
let vk = self.device().pointers();
|
||||
let cmd = self.internal_object();
|
||||
|
||||
debug_assert!(draw_count == 0 || ((stride % 4) == 0) &&
|
||||
stride as usize >= mem::size_of::<vk::DrawIndirectCommand>());
|
||||
|
||||
let inner = buffer.inner();
|
||||
debug_assert!(inner.offset < buffer.size());
|
||||
|
Loading…
Reference in New Issue
Block a user