From 9773340c9a5a22f91025c4d1164145a40d6e4322 Mon Sep 17 00:00:00 2001 From: hodasemi Date: Sat, 21 Jan 2023 11:49:43 +0100 Subject: [PATCH] Update to vulkan lib changes --- src/overlay/elements/leaderboard/bg_generator.rs | 3 ++- src/overlay/elements/pedals/mod.rs | 6 +++--- src/overlay/elements/radar/mod.rs | 11 +++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/overlay/elements/leaderboard/bg_generator.rs b/src/overlay/elements/leaderboard/bg_generator.rs index bf62cdf..f8a8b44 100644 --- a/src/overlay/elements/leaderboard/bg_generator.rs +++ b/src/overlay/elements/leaderboard/bg_generator.rs @@ -61,7 +61,8 @@ impl BackgroundGenerator { }) .set_sample_count(max_supported_sample_count) .add_resolve_targets(vec![image.clone()]) - .build(&device, &queue)?, + .use_queue(queue.clone()) + .build(&device)?, ) .build(&device)?; diff --git a/src/overlay/elements/pedals/mod.rs b/src/overlay/elements/pedals/mod.rs index c4e057d..9114ac8 100644 --- a/src/overlay/elements/pedals/mod.rs +++ b/src/overlay/elements/pedals/mod.rs @@ -78,7 +78,7 @@ impl Pedals { .add_sub_pass( SubPass::builder(history_image.width(), history_image.height()) .set_prepared_targets(&[history_image.clone()], 0, [0.3, 0.3, 0.3, 1.0], true) - .build(&device, &queue)?, + .build(&device)?, ) .build(&device)?; @@ -213,7 +213,7 @@ impl Pedals { ))?; self.render_target - .begin(&recorder, VK_SUBPASS_CONTENTS_INLINE, 0); + .begin(&mut recorder, VK_SUBPASS_CONTENTS_INLINE, 0); recorder.bind_pipeline(self.pipeline.pipeline())?; @@ -225,7 +225,7 @@ impl Pedals { recorder.bind_vertex_buffer(&self.brake_vertex_buffer); 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) diff --git a/src/overlay/elements/radar/mod.rs b/src/overlay/elements/radar/mod.rs index f9307c5..cdc4193 100644 --- a/src/overlay/elements/radar/mod.rs +++ b/src/overlay/elements/radar/mod.rs @@ -116,7 +116,7 @@ impl Radar { rendering.swapchain().height(), ) .set_prepared_targets(&rendering.images(), 0, [0.0, 0.0, 0.0, 1.0], false) - .build(&device, &queue)?, + .build(&device)?, ) .build(&device)?; @@ -226,8 +226,11 @@ impl Radar { | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, ))?; - self.render_target - .begin(&recorder, VK_SUBPASS_CONTENTS_INLINE, image_index as usize); + self.render_target.begin( + &mut recorder, + VK_SUBPASS_CONTENTS_INLINE, + image_index as usize, + ); recorder.bind_pipeline(self.pipeline.pipeline())?; @@ -239,7 +242,7 @@ impl Radar { recorder.draw_complete_single_instance(buffer.size() as u32); } - self.render_target.end(&recorder); + self.render_target.end(&mut recorder); } Ok(command_buffer) -- 2.47.0