first step for compute task
This commit is contained in:
parent
579820334d
commit
c02522b6c2
16 changed files with 470 additions and 32 deletions
|
@ -57,6 +57,22 @@ pub unsafe fn create_command_buffers(device: &Device, data: &mut app_data::AppDa
|
|||
},
|
||||
};
|
||||
|
||||
// define the compute load before going into the render pass
|
||||
if scene_handler.volumetrics.len() != 0 {
|
||||
device.cmd_bind_pipeline(
|
||||
*command_buffer, vk::PipelineBindPoint::COMPUTE, data.pipeline_compute); //todo build own pipeline
|
||||
|
||||
device.cmd_bind_descriptor_sets(
|
||||
*command_buffer,
|
||||
vk::PipelineBindPoint::COMPUTE,
|
||||
data.pipeline_layout,
|
||||
0,
|
||||
&[data.descriptor_sets[i]],
|
||||
&[]);
|
||||
|
||||
device.cmd_dispatch(*command_buffer, (data.compute_task_one_size as f64 / 256.0).ceil() as u32, 1, 1);
|
||||
}
|
||||
// start render pass
|
||||
let clear_values = &[color_clear_value, depth_clear_value];
|
||||
let info = vk::RenderPassBeginInfo::builder()
|
||||
.render_pass(data.render_pass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue