i guess descriptor sets make everything crash

This commit is contained in:
Alex Janka 2023-10-25 17:06:59 +11:00
parent a4ded97b06
commit 5d4b313140

View file

@ -35,7 +35,6 @@ pub(super) struct VulkanData {
pub(super) setup_commands_reuse_fence: vk::Fence,
pub(super) texture_copy_commands_reuse_fence: vk::Fence,
pub(super) descriptor_sets: Vec<vk::DescriptorSet>,
pub(super) descriptor_pool: vk::DescriptorPool,
}
@ -181,13 +180,6 @@ impl VulkanData {
.create_descriptor_set_layout(&descriptor_info, None)
.unwrap()];
let desc_alloc_info = vk::DescriptorSetAllocateInfo::builder()
.descriptor_pool(descriptor_pool)
.set_layouts(&desc_set_layouts)
.build();
let descriptor_sets = device.allocate_descriptor_sets(&desc_alloc_info).unwrap();
Self {
pdevice,
device,
@ -202,7 +194,6 @@ impl VulkanData {
draw_commands_reuse_fence,
setup_commands_reuse_fence,
texture_copy_commands_reuse_fence,
descriptor_sets,
desc_set_layouts,
descriptor_pool,
}
@ -566,22 +557,6 @@ impl SwapchainData {
.create_image_view(&shader_input_tex_image_view_info, None)
.unwrap();
let shader_input_tex_descriptor = vk::DescriptorImageInfo {
image_layout: vk::ImageLayout::SHADER_READ_ONLY_OPTIMAL,
image_view: shader_input_tex_image_view,
sampler,
};
let write_desc_sets = [vk::WriteDescriptorSet {
dst_set: vulkan.descriptor_sets[0],
dst_binding: 1,
descriptor_count: 1,
descriptor_type: vk::DescriptorType::COMBINED_IMAGE_SAMPLER,
p_image_info: &shader_input_tex_descriptor,
..Default::default()
}];
vulkan.device.update_descriptor_sets(&write_desc_sets, &[]);
(
Self {
swapchain_loader,