Move create_image_view to vkSwapchain->create_present_image_view
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s

This commit is contained in:
Florian RICHER 2024-11-17 16:18:35 +01:00
parent 891835c4af
commit 002d6fa9a4
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
2 changed files with 27 additions and 28 deletions

View file

@ -69,32 +69,6 @@ impl VkDevice {
self.queues.get(queue_index as usize)
}
pub(super) fn create_image_view(
&self,
image: vk::Image,
surface_format: vk::SurfaceFormatKHR,
) -> VkResult<vk::ImageView> {
let create_view_info = vk::ImageViewCreateInfo::default()
.view_type(vk::ImageViewType::TYPE_2D)
.format(surface_format.format)
.components(vk::ComponentMapping {
r: vk::ComponentSwizzle::R,
g: vk::ComponentSwizzle::G,
b: vk::ComponentSwizzle::B,
a: vk::ComponentSwizzle::A,
})
.subresource_range(vk::ImageSubresourceRange {
aspect_mask: vk::ImageAspectFlags::COLOR,
base_mip_level: 0,
level_count: 1,
base_array_layer: 0,
layer_count: 1,
})
.image(image);
unsafe { self.handle.create_image_view(&create_view_info, None) }
}
pub(super) fn create_command_pool(
&self,
info: &vk::CommandPoolCreateInfo,