fix: clean up dead code warnings in vulkan.rs

Remove unused fields from VulkanRenderer: pixel_w, pixel_h,
physical_device, queue_family, swapchain_format. Mark unused
device param in create_swapchain as _device.

Only winit deprecation warnings remain (create_window, run).
This commit is contained in:
Emil
2026-06-21 01:02:20 +03:00
parent 019ae8f090
commit 45d2767719
+5 -10
View File
@@ -39,21 +39,16 @@ struct PushConstants {
pub struct VulkanRenderer { pub struct VulkanRenderer {
grid_w: usize, grid_w: usize,
grid_h: usize, grid_h: usize,
pixel_w: u32,
pixel_h: u32,
entry: ash::Entry, entry: ash::Entry,
instance: ash::Instance, instance: ash::Instance,
surface: vk::SurfaceKHR, surface: vk::SurfaceKHR,
physical_device: vk::PhysicalDevice,
device: ash::Device, device: ash::Device,
graphics_queue: vk::Queue, graphics_queue: vk::Queue,
queue_family: u32,
swapchain_loader: ash::khr::swapchain::Device, swapchain_loader: ash::khr::swapchain::Device,
swapchain: vk::SwapchainKHR, swapchain: vk::SwapchainKHR,
swapchain_image_views: Vec<vk::ImageView>, swapchain_image_views: Vec<vk::ImageView>,
swapchain_format: vk::Format,
swapchain_extent: vk::Extent2D, swapchain_extent: vk::Extent2D,
render_pass: vk::RenderPass, render_pass: vk::RenderPass,
@@ -148,11 +143,11 @@ impl VulkanRenderer {
update_descriptor_set(&device, descriptor_set, atlas_view, atlas_sampler); update_descriptor_set(&device, descriptor_set, atlas_view, atlas_sampler);
Ok(Self { Ok(Self {
grid_w, grid_h, pixel_w, pixel_h, grid_w, grid_h,
entry, instance, surface, physical_device, device, entry, instance, surface, device,
graphics_queue, queue_family, graphics_queue,
swapchain_loader, swapchain, swapchain_image_views, swapchain_loader, swapchain, swapchain_image_views,
swapchain_format, swapchain_extent, swapchain_extent,
render_pass, pipeline, pipeline_layout, framebuffers, render_pass, pipeline, pipeline_layout, framebuffers,
command_pool, command_buffers, command_pool, command_buffers,
image_available, render_finished, in_flight, frame_index: 0, image_available, render_finished, in_flight, frame_index: 0,
@@ -422,7 +417,7 @@ fn create_device(instance: &ash::Instance, pd: vk::PhysicalDevice, qf: u32) -> R
} }
fn create_swapchain( fn create_swapchain(
device: &ash::Device, _device: &ash::Device,
sl: &ash::khr::swapchain::Device, sl: &ash::khr::swapchain::Device,
surface_loader: &ash::khr::surface::Instance, surface_loader: &ash::khr::surface::Instance,
pd: vk::PhysicalDevice, pd: vk::PhysicalDevice,