Fix errors
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s

This commit is contained in:
Florian RICHER 2024-11-20 20:08:31 +01:00
parent 1dc9da0d61
commit 2590db0a06
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
8 changed files with 123 additions and 88 deletions

View file

@ -17,9 +17,9 @@ pub struct VkGraphicsPipeline {
impl VkGraphicsPipeline {
pub fn new(
device: Arc<VkDevice>,
swapchain: Arc<VkSwapchain>,
render_pass: Arc<VkRenderPass>,
device: &Arc<VkDevice>,
swapchain: &Arc<VkSwapchain>,
render_pass: &Arc<VkRenderPass>,
) -> anyhow::Result<Self> {
let shader_entry_name = CStr::from_bytes_with_nul(b"main\0")?;
@ -107,9 +107,9 @@ impl VkGraphicsPipeline {
log::debug!("Pipeline created ({pipeline_layout:?})");
Ok(Self {
device,
swapchain,
render_pass,
device: device.clone(),
swapchain: swapchain.clone(),
render_pass: render_pass.clone(),
pipeline_layout,
pipeline,
vertex_shader: vert_shader_module,
@ -124,8 +124,10 @@ impl Drop for VkGraphicsPipeline {
self.device.handle.destroy_pipeline(self.pipeline, None);
log::debug!("Pipeline destroyed ({:?})", self.pipeline);
self.device.handle.destroy_pipeline_layout(self.pipeline_layout, None);
self.device
.handle
.destroy_pipeline_layout(self.pipeline_layout, None);
log::debug!("Pipeline layout destroyed ({:?})", self.pipeline_layout);
}
}
}
}