mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 08:14:20 +00:00
dispatch now takes a single parameter for the dimensions
This commit is contained in:
parent
1dfbdd81fd
commit
504839c11a
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user