summary refs log tree commit diff
path: root/src/graphics/permanent.rs
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-08-08 05:32:41 -0700
committerIrene Knapp <ireneista@irenes.space>2026-08-08 05:32:41 -0700
commitd56eb5e4c223f5c89117cda8dfb1527e02b6a90c (patch)
tree18e02395408c2dd12e15bdaf13af7c8a54582c9a /src/graphics/permanent.rs
parentecee10d87f5f2c8b56647ce2a2790f03880f573c (diff)
remove physical_device from ForReinit
Vulkanalia tracks it for us in Device. it's used in Model, so it wasn't strictly in-scope for ForReinit; this solves the problem and simplifies some stuff.

Force-Push: yes
Change-Id: I8e38c236b3dc4c112671382a062c9ada2f34fbb1
Diffstat (limited to 'src/graphics/permanent.rs')
-rw-r--r--src/graphics/permanent.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/graphics/permanent.rs b/src/graphics/permanent.rs
index 5282e21..beda3fe 100644
--- a/src/graphics/permanent.rs
+++ b/src/graphics/permanent.rs
@@ -123,8 +123,8 @@ impl PermanentGraphicsState {
       vulkanalia::window::create_surface(&instance, &window, &window)
     }?;
 
-    let (physical_device, device, indices, sample_count, graphics_queue,
-         presentation_queue, enable_anisotropy, enable_swapchain)
+    let (device, indices, sample_count, graphics_queue, presentation_queue,
+         enable_anisotropy, enable_swapchain)
         = init_vulkan_device(&instance, &surface,
                              enable_validation, enable_portability)?;
 
@@ -134,7 +134,7 @@ impl PermanentGraphicsState {
       window, entry, instance, debug_messager, surface, device,
       graphics_queue, presentation_queue
     }, GraphicsStateForReinit {
-      physical_device, indices, sample_count, descriptor_set_layout,
+      indices, sample_count, descriptor_set_layout,
     }, enable_anisotropy, enable_swapchain))
   }
 
@@ -215,7 +215,6 @@ impl PermanentGraphicsState {
 // initial startup, and again any time the window-dressing needs to be
 // reinitialized. Most notably, they are not needed when rendering.
 pub struct GraphicsStateForReinit {
-  pub physical_device: vk::PhysicalDevice,
   pub indices: QueueFamilyIndices,
   pub sample_count: vk::SampleCountFlags,
   pub descriptor_set_layout: vk::DescriptorSetLayout,
@@ -416,9 +415,8 @@ fn init_vulkan(window: &Window)
 fn init_vulkan_device(instance: &Instance, surface: &vk::SurfaceKHR,
                       enable_validation: EnableValidation,
                       enable_portability: EnablePortability)
-    -> Result<(vk::PhysicalDevice, Device, QueueFamilyIndices,
-               vk::SampleCountFlags, vk::Queue, vk::Queue, EnableAnisotropy,
-               EnableSwapchain)>
+    -> Result<(Device, QueueFamilyIndices, vk::SampleCountFlags, vk::Queue,
+               vk::Queue, EnableAnisotropy, EnableSwapchain)>
 {
   let (physical_device, indices, sample_count)
           = pick_vulkan_device(instance, surface)?;
@@ -541,8 +539,8 @@ fn init_vulkan_device(instance: &Instance, surface: &vk::SurfaceKHR,
     device.get_device_queue(indices.presentation, 0)
   };
 
-  Ok((physical_device, device, indices, sample_count, graphics_queue,
-      presentation_queue, enable_anisotropy, enable_swapchain))
+  Ok((device, indices, sample_count, graphics_queue, presentation_queue,
+      enable_anisotropy, enable_swapchain))
 }