This commit is contained in:
parent
1dc9da0d61
commit
2590db0a06
8 changed files with 123 additions and 88 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue