Update to vulkan lib changes

This commit is contained in:
hodasemi 2023-01-21 11:49:43 +01:00
parent d49fbd6f6e
commit 9773340c9a
3 changed files with 12 additions and 8 deletions

View file

@ -61,7 +61,8 @@ impl BackgroundGenerator {
}) })
.set_sample_count(max_supported_sample_count) .set_sample_count(max_supported_sample_count)
.add_resolve_targets(vec![image.clone()]) .add_resolve_targets(vec![image.clone()])
.build(&device, &queue)?, .use_queue(queue.clone())
.build(&device)?,
) )
.build(&device)?; .build(&device)?;

View file

@ -78,7 +78,7 @@ impl Pedals {
.add_sub_pass( .add_sub_pass(
SubPass::builder(history_image.width(), history_image.height()) SubPass::builder(history_image.width(), history_image.height())
.set_prepared_targets(&[history_image.clone()], 0, [0.3, 0.3, 0.3, 1.0], true) .set_prepared_targets(&[history_image.clone()], 0, [0.3, 0.3, 0.3, 1.0], true)
.build(&device, &queue)?, .build(&device)?,
) )
.build(&device)?; .build(&device)?;
@ -213,7 +213,7 @@ impl Pedals {
))?; ))?;
self.render_target self.render_target
.begin(&recorder, VK_SUBPASS_CONTENTS_INLINE, 0); .begin(&mut recorder, VK_SUBPASS_CONTENTS_INLINE, 0);
recorder.bind_pipeline(self.pipeline.pipeline())?; recorder.bind_pipeline(self.pipeline.pipeline())?;
@ -225,7 +225,7 @@ impl Pedals {
recorder.bind_vertex_buffer(&self.brake_vertex_buffer); recorder.bind_vertex_buffer(&self.brake_vertex_buffer);
recorder.draw_complete_single_instance(self.brake_vertex_buffer.size() as u32); recorder.draw_complete_single_instance(self.brake_vertex_buffer.size() as u32);
self.render_target.end(&recorder); self.render_target.end(&mut recorder);
} }
Ok(command_buffer) Ok(command_buffer)

View file

@ -116,7 +116,7 @@ impl Radar {
rendering.swapchain().height(), rendering.swapchain().height(),
) )
.set_prepared_targets(&rendering.images(), 0, [0.0, 0.0, 0.0, 1.0], false) .set_prepared_targets(&rendering.images(), 0, [0.0, 0.0, 0.0, 1.0], false)
.build(&device, &queue)?, .build(&device)?,
) )
.build(&device)?; .build(&device)?;
@ -226,8 +226,11 @@ impl Radar {
| VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT,
))?; ))?;
self.render_target self.render_target.begin(
.begin(&recorder, VK_SUBPASS_CONTENTS_INLINE, image_index as usize); &mut recorder,
VK_SUBPASS_CONTENTS_INLINE,
image_index as usize,
);
recorder.bind_pipeline(self.pipeline.pipeline())?; recorder.bind_pipeline(self.pipeline.pipeline())?;
@ -239,7 +242,7 @@ impl Radar {
recorder.draw_complete_single_instance(buffer.size() as u32); recorder.draw_complete_single_instance(buffer.size() as u32);
} }
self.render_target.end(&recorder); self.render_target.end(&mut recorder);
} }
Ok(command_buffer) Ok(command_buffer)