From 5d4b3131400ececc640d53d49be5b668a6855b62 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Wed, 25 Oct 2023 17:06:59 +1100 Subject: [PATCH] i guess descriptor sets make everything crash --- lib/src/renderer/vulkan/types.rs | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/lib/src/renderer/vulkan/types.rs b/lib/src/renderer/vulkan/types.rs index 81bb56a..158535b 100644 --- a/lib/src/renderer/vulkan/types.rs +++ b/lib/src/renderer/vulkan/types.rs @@ -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, 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,