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

@ -11,10 +11,7 @@ pub struct VkRenderPass {
}
impl VkRenderPass {
pub fn new(
device: Arc<VkDevice>,
swapchain: Arc<VkSwapchain>,
) -> VkResult<Self> {
pub fn new(device: &Arc<VkDevice>, swapchain: &Arc<VkSwapchain>) -> VkResult<Self> {
let color_attachment = vk::AttachmentDescription::default()
.format(swapchain.surface_format.format)
.samples(vk::SampleCountFlags::TYPE_1)
@ -40,14 +37,12 @@ impl VkRenderPass {
.attachments(&attachments)
.subpasses(&subpasses);
let render_pass = unsafe {
device.handle.create_render_pass(&render_pass_info, None)?
};
let render_pass = unsafe { device.handle.create_render_pass(&render_pass_info, None)? };
log::debug!("Render pass created ({render_pass:?})");
Ok(Self {
device,
swapchain,
device: device.clone(),
swapchain: swapchain.clone(),
handle: render_pass,
})
}
@ -60,4 +55,4 @@ impl Drop for VkRenderPass {
log::debug!("Render pass destroyed ({:?})", self.handle);
}
}
}
}