dispatch now takes a single parameter for the dimensions

This commit is contained in:
Pierre Krieger 2016-03-29 13:29:26 +02:00
parent 1dfbdd81fd
commit 504839c11a
2 changed files with 4 additions and 4 deletions

View File

@ -668,7 +668,7 @@ impl InnerCommandBufferBuilder {
}
pub unsafe fn dispatch<Pl, L>(mut self, pipeline: &Arc<ComputePipeline<Pl>>, sets: L,
x: u32, y: u32, z: u32) -> InnerCommandBufferBuilder
dimensions: [u32; 3]) -> InnerCommandBufferBuilder
where L: 'static + DescriptorSetsCollection,
Pl: 'static + PipelineLayoutDesc
{
@ -677,7 +677,7 @@ impl InnerCommandBufferBuilder {
self.bind_compute_pipeline_state(pipeline, sets);
self.staging_commands.push(Box::new(move |vk, cmd| {
vk.CmdDispatch(cmd, x, y, z);
vk.CmdDispatch(cmd, dimensions[0], dimensions[1], dimensions[2]);
}));
self

View File

@ -186,13 +186,13 @@ impl PrimaryCommandBufferBuilder {
/// Executes a compute pipeline.
#[inline]
pub fn dispatch<Pl, L>(self, pipeline: &Arc<ComputePipeline<Pl>>, sets: L,
x: u32, y: u32, z: u32) -> PrimaryCommandBufferBuilder
dimensions: [u32; 3]) -> PrimaryCommandBufferBuilder
where L: 'static + DescriptorSetsCollection,
Pl: 'static + PipelineLayoutDesc
{
unsafe {
PrimaryCommandBufferBuilder {
inner: self.inner.dispatch(pipeline, sets, x, y, z)
inner: self.inner.dispatch(pipeline, sets, dimensions)
}
}
}