mirror of
https://github.com/italicsjenga/portability.git
synced 2024-10-17 14:51:30 +11:00
Implement dispatch
This commit is contained in:
parent
07fc60dad9
commit
90e972fcab
|
@ -877,7 +877,7 @@ pub extern "C" fn gfxBindBufferMemory(
|
||||||
let temp = unsafe { mem::zeroed() };
|
let temp = unsafe { mem::zeroed() };
|
||||||
|
|
||||||
*buffer = match mem::replace(&mut *buffer, temp) {
|
*buffer = match mem::replace(&mut *buffer, temp) {
|
||||||
Buffer::Buffer(_) => panic!("An non-sparse buffer can only be bound once!"),
|
Buffer::Buffer(_) => panic!("A non-sparse buffer can only be bound once!"),
|
||||||
Buffer::Unbound(unbound) => {
|
Buffer::Unbound(unbound) => {
|
||||||
Buffer::Buffer(
|
Buffer::Buffer(
|
||||||
gpu.device
|
gpu.device
|
||||||
|
@ -2852,20 +2852,23 @@ pub extern "C" fn gfxCmdDrawIndexedIndirect(
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
pub extern "C" fn gfxCmdDispatch(
|
pub extern "C" fn gfxCmdDispatch(
|
||||||
_commandBuffer: VkCommandBuffer,
|
mut commandBuffer: VkCommandBuffer,
|
||||||
_groupCountX: u32,
|
groupCountX: u32,
|
||||||
_groupCountY: u32,
|
groupCountY: u32,
|
||||||
_groupCountZ: u32,
|
groupCountZ: u32,
|
||||||
) {
|
) {
|
||||||
unimplemented!()
|
commandBuffer.dispatch([groupCountX, groupCountY, groupCountZ])
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
pub extern "C" fn gfxCmdDispatchIndirect(
|
pub extern "C" fn gfxCmdDispatchIndirect(
|
||||||
_commandBuffer: VkCommandBuffer,
|
mut commandBuffer: VkCommandBuffer,
|
||||||
_buffer: VkBuffer,
|
buffer: VkBuffer,
|
||||||
_offset: VkDeviceSize,
|
offset: VkDeviceSize,
|
||||||
) {
|
) {
|
||||||
unimplemented!()
|
match *buffer {
|
||||||
|
Buffer::Buffer(ref b) => commandBuffer.dispatch_indirect(b, offset),
|
||||||
|
Buffer::Unbound(_) => panic!("Bound buffer expected!"),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
pub extern "C" fn gfxCmdCopyBuffer(
|
pub extern "C" fn gfxCmdCopyBuffer(
|
||||||
|
|
Loading…
Reference in a new issue