Fix some debug assertions with indirect rendering

This commit is contained in:
Pierre Krieger 2017-07-17 20:38:22 +02:00
parent 59395c92bf
commit 42431544a9

View File

@ -968,7 +968,7 @@ impl<P> UnsafeCommandBufferBuilder<P> {
stride as usize >= mem::size_of::<vk::DrawIndirectCommand>());
let inner = buffer.inner();
debug_assert!(inner.offset < buffer.size());
debug_assert!(inner.offset < inner.buffer.size());
debug_assert!(inner.buffer.usage_indirect_buffer());
vk.CmdDrawIndirect(cmd,
@ -987,7 +987,7 @@ impl<P> UnsafeCommandBufferBuilder<P> {
let cmd = self.internal_object();
let inner = buffer.inner();
debug_assert!(inner.offset < buffer.size());
debug_assert!(inner.offset < inner.buffer.size());
debug_assert!(inner.buffer.usage_indirect_buffer());
vk.CmdDrawIndexedIndirect(cmd,