hakolao / egui_winit_vulkano

Egui gui integration with winit and vulkano
Apache License 2.0
79 stars 40 forks source link

Lagging GUI #69

Open freddycansic opened 7 months ago

freddycansic commented 7 months ago

Expected Behaviour

GUI is responsive

Observed Behaviour

There is a long lag time between interacting with GUI elements and them responding.

Environment

Video

https://github.com/hakolao/egui_winit_vulkano/assets/93549743/94fdaca4-93f4-41a9-9732-010ef5df2147

Code

I'm using approach 4 to ensure egui renders into the correct color space.

Enable khr_swapchain_mutable_format.

let required_device_extensions = DeviceExtensions {
    khr_swapchain: true,
    khr_swapchain_mutable_format: true,
    ..DeviceExtensions::empty()
};

Create swapchain with SwapchainCreateFlags::MUTABLE_FORMAT.

let (swapchain, images) = Swapchain::new(
    vulkan_context.device.clone(),
    vulkan_context.surface.clone(),
    SwapchainCreateInfo {
        image_format: swapchain_format,
        image_view_formats: vec![swapchain_format, Format::R8G8B8A8_UNORM],
        min_image_count: surface_capabilities.min_image_count.max(2),
        image_extent: window_context.window.clone().inner_size().into(),
        image_usage: ImageUsage::COLOR_ATTACHMENT,
        composite_alpha: surface_capabilities
            .supported_composite_alpha
            .into_iter()
            .next()
            .unwrap(),
        flags: SwapchainCreateFlags::MUTABLE_FORMAT,
            ..Default::default()
    },
).expect("Failed to create Swapchain and/or Images");

Create Format::R8G8B8A8_UNORM image views of swapchain images.

let gui_image_views = images
    .iter()
    .map(|image| {
        ImageView::new(
            image.clone(),
            ImageViewCreateInfo {
                format: Format::R8G8B8A8_UNORM,
                ..ImageViewCreateInfo::from_image(image)
            },
        )
    })
    .map(Result::unwrap)
    .collect_vec();

Initialise Gui object with correct image view format.

let gui = Gui::new(
    event_loop,
    vulkan_context.surface.clone(),
    vulkan_context.queue.clone(),
    rendering_context.gui_image_views[0].format(),
    GuiConfig {
        is_overlay: true,
        ..Default::default()
    },
);

Create GUI elements in render loop.

WindowEvent::RedrawRequested => {
    self.gui.immediate_ui(|gui| {
        let ctx = gui.context();

        egui::TopBottomPanel::top("top_panel").show(&ctx, |ui| {
            ui.menu_button("File", |ui| {
                if ui.add(egui::Button::new("Import model")).clicked() {
                    ui.close_menu();
                }
            });
        });

        egui::SidePanel::left("left_panel").show(&ctx, |ui| {
            ui.heading("My egui Application");
            ui.label("Hello world");
        });
    });

    self.render(&mut frame_state);
}

Render scene and GUI then present.

let future = self
    .previous_frame_end
    .take()
    .unwrap()
    .join(acquire_future)
    .then_execute(self.vulkan_context.queue.clone(), command_buffer)
    .unwrap()
    .then_signal_fence_and_flush()
    .unwrap();

let gui_future = self.gui.draw_on_image(
    future,
    self.rendering_context.gui_image_views[image_index as usize].clone(),
);

let future = gui_future
    .then_swapchain_present(
        self.vulkan_context.queue.clone(),
        SwapchainPresentInfo::swapchain_image_index(
            self.rendering_context.swapchain.clone(),
            image_index,
        ),
    )
.then_signal_fence_and_flush();

This issue comes from my repo, vulkano-teapot. You can look at the whole source here if you need.

This issue does not happen in your examples, so something's wrong with my code somewhere.

This is a link to a flamegraph I generated using cargo-flamegraph https://github.com/hakolao/egui_winit_vulkano/assets/93549743/63f474b4-6bde-4f44-9407-c5d5071475a9

Thanks in advance for taking the time to look over this issue :)

Letronix624 commented 7 months ago

I am noticing you are using my branch for your project. I am unable to reproduce the problem, even after running your project just after updating egui in your Cargo.toml to 0.27. Maybe try running cargo update and doing the same to see if the issue is resolved in the newest egui release, or if that does not work try to run the examples in my repository if your have not done that and see if those also experience lag. Would be happy to help you with your problem.

freddycansic commented 7 months ago

Thank you for the quick response.

Unfortunately none of these fixes have solved my problem. The examples in your repository don't experience the same lag.

Also now I've updated the egui version to 0.27, I'm getting crashes after 1-4 frames of rendering. Here's the logs for that.

The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: a validation error occurred

Caused by:
    access to a resource has been denied (resource use: Some(ResourceUseRef { command_index: 0, command_name: "begin_render_pass", resource_in_command: FramebufferAttachment { index: 0 }, secondary_use_ref: None }), error: the resource is already in use, and there is no tracking of concurrent usages)
Location: /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/command_buffer/traits.rs:215

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 9 frames hidden ⋮                               
  10: core::result::Result<T,E>::unwrap::h57694997138fa6a0
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/result.rs:1077
  11: <vulkano::command_buffer::traits::CommandBufferExecFuture<F> as vulkano::sync::future::GpuFuture>::flush::hf5d148cc8f78687f
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/command_buffer/traits.rs:215
       213 │                 SubmitAnyBuilder::Empty => {}
       214 │                 SubmitAnyBuilder::CommandBuffer(submit_info, fence) => {
       215 >                     queue_submit(&self.queue, submit_info, fence, &self.previous).unwrap();
       216 │                 }
       217 │                 _ => unreachable!(),
  12: <alloc::boxed::Box<F> as vulkano::sync::future::GpuFuture>::flush::hd19f76425fd7f176
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/mod.rs:409
       407 │ 
       408 │     fn flush(&self) -> Result<(), Validated<VulkanError>> {
       409 >         (**self).flush()
       410 │     }
       411 │ 
  13: <vulkano::swapchain::acquire_present::PresentFuture<P> as vulkano::sync::future::GpuFuture>::build_submission::h650d2a9245d95fc3
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/swapchain/acquire_present.rs:855
       853 │             }
       854 │             SubmitAnyBuilder::CommandBuffer(_, _) => {
       855 >                 self.previous.flush()?;
       856 │ 
       857 │                 SubmitAnyBuilder::QueuePresent(PresentInfo {
  14: vulkano::sync::future::fence_signal::FenceSignalFuture<F>::flush_impl::h8c2eadea0c74f9f6
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/fence_signal.rs:233
       231 │                 Full(E),
       232 │             }
       233 >             let result = match previous.build_submission()? {
       234 │                 SubmitAnyBuilder::Empty => {
       235 │                     debug_assert!(!partially_flushed);
  15: <vulkano::sync::future::fence_signal::FenceSignalFuture<F> as vulkano::sync::future::GpuFuture>::flush::h1675dfb48aa38e6c
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/fence_signal.rs:432
       430 │     fn flush(&self) -> Result<(), Validated<VulkanError>> {
       431 │         let mut state = self.state.lock();
       432 >         self.flush_impl(&mut state)
       433 │     }
       434 │ 
  16: vulkano::sync::future::GpuFuture::then_signal_fence_and_flush::hc198a6f6793c76a4
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/mod.rs:327
       325 │     {
       326 │         let f = self.then_signal_fence();
       327 >         f.flush()?;
       328 │ 
       329 │         Ok(f)
  17: vulkano_teapot::app::App::render::h651d12c975208449
      at /home/freddy/dev/vulkano-teapot/src/app.rs:359
       357 │         );
       358 │ 
       359 >         let future = gui_future
       360 │             .then_swapchain_present(
       361 │                 self.vulkan_context.queue.clone(),
  18: vulkano_teapot::app::App::run::{{closure}}::h6bb50ebbe1097ceb
      at /home/freddy/dev/vulkano-teapot/src/app.rs:190
       188 │                                     });
       189 │                                 });
       190 >                                 self.render(&mut frame_state);
       191 │                                 frame_state.frame_count = (frame_state.frame_count + 1) % u128::MAX;
       192 │                                 self.input.reset_just_released();
  19: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h2e8180dabea1a2ff
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/ops/function.rs:294
  20: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h4e9a32d24fcba407
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/ops/function.rs:294
  21: winit::platform_impl::platform::x11::EventLoop<T>::single_iteration::h9dd78153994b86fd
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:602
       600 │             for window_id in windows {
       601 │                 let window_id = crate::window::WindowId(window_id);
       602 >                 callback(
       603 │                     Event::WindowEvent {
       604 │                         window_id,
  22: winit::platform_impl::platform::x11::EventLoop<T>::poll_events_with_timeout::he99e19cd40641348
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:541
       539 │         }
       540 │ 
       541 >         self.single_iteration(&mut callback, cause);
       542 │     }
       543 │ 
  23: winit::platform_impl::platform::x11::EventLoop<T>::pump_events::h886f330c08933ab6
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:447
       445 │         // request to Exit.
       446 │         if !self.exiting() {
       447 >             self.poll_events_with_timeout(timeout, &mut callback);
       448 │         }
       449 │         if let Some(code) = self.exit_code() {
  24: winit::platform_impl::platform::x11::EventLoop<T>::run_on_demand::h1149e8fef66e36e8
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:408
       406 │ 
       407 │         let exit = loop {
       408 >             match self.pump_events(None, &mut event_handler) {
       409 │                 PumpStatus::Exit(0) => {
       410 │                     break Ok(());
  25: winit::platform_impl::platform::EventLoop<T>::run_on_demand::h2307ac378ef21318
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/mod.rs:829
       827 │         F: FnMut(crate::event::Event<T>, &RootELW<T>),
       828 │     {
       829 >         x11_or_wayland!(match self; EventLoop(evlp) => evlp.run_on_demand(callback))
       830 │     }
       831 │ 
  26: winit::platform_impl::platform::EventLoop<T>::run::h4563f994199e9e97
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/mod.rs:822
       820 │         F: FnMut(crate::event::Event<T>, &RootELW<T>),
       821 │     {
       822 >         self.run_on_demand(callback)
       823 │     }
       824 │ 
  27: winit::event_loop::EventLoop<T>::run::h5d90d01a4595d410
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/event_loop.rs:249
       247 │         F: FnMut(Event<T>, &EventLoopWindowTarget<T>),
       248 │     {
       249 >         self.event_loop.run(event_handler)
       250 │     }
       251 │ 
  28: vulkano_teapot::app::App::run::he2418a0c0c78684b
      at /home/freddy/dev/vulkano-teapot/src/app.rs:144
       142 │         };
       143 │ 
       144 >         event_loop
       145 │             .run(move |event, event_loop_window_target| {
       146 │                 println!("{:?}", event);
  29: vulkano_teapot::main::h756cc3867071c21b
      at /home/freddy/dev/vulkano-teapot/src/main.rs:27
        25 │ 
        26 │     let app = App::new(&event_loop);
        27 >     app.run(event_loop);
        28 │ }
  30: core::ops::function::FnOnce::call_once::hf9ff53839cfeca28
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/ops/function.rs:250
                                ⋮ 16 frames hidden ⋮                              

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyFramebuffer-framebuffer-00892] [validation] Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0x90d1cd00000000b4[] that is currently in use by VkCommandBuffer 0x55bafd5ce940[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyFramebuffer-framebuffer-00892] [validation] Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0x84ad8300000000ba[] that is currently in use by VkCommandBuffer 0x55bafd5d2180[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyBuffer-buffer-00922] [validation] Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0xd10d270000000018[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyBuffer-buffer-00922] [validation] Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0x95a125000000001a[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyBuffer-buffer-00922] [validation] Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0xcb1c7c000000001b[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyBuffer-buffer-00922] [validation] Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0x2cfba2000000001c[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyImageView-imageView-01026] [validation] Validation Error: [ VUID-vkDestroyImageView-imageView-01026 ] | MessageID = 0x63ac21f0 | vkDestroyImageView():  can't be called on VkImageView 0xb097c90000000027[] that is currently in use by VkDescriptorSet 0x4e4775000000006e[]. The Vulkan spec states: All submitted commands that refer to imageView must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyImageView-imageView-01026)
[18:14:39 ERROR vulkano_teapot::debug] [VUID-vkDestroyImage-image-01000] [validation] Validation Error: [ VUID-vkDestroyImage-image-01000 ] | MessageID = 0xf2d29b5a | vkDestroyImage():  can't be called on VkImage 0xa2eb680000000026[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyImage-image-01000)
VUID-vkDestroyFramebuffer-framebuffer-00892(ERROR / SPEC): msgNum: -617577710 - Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0x5c5283000000003e[] that is currently in use by VkCommandBuffer 0x55bafd139a60[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
    Objects: 0
VUID-vkDestroyFramebuffer-framebuffer-00892(ERROR / SPEC): msgNum: -617577710 - Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0x56c9bd0000000040[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
    Objects: 0
VUID-vkDestroyImage-image-01000(ERROR / SPEC): msgNum: -221078694 - Validation Error: [ VUID-vkDestroyImage-image-01000 ] | MessageID = 0xf2d29b5a | vkDestroyImage():  can't be called on VkImage 0x5eb05e000000003b[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyImage-image-01000)
    Objects: 0
VUID-vkDestroyPipeline-pipeline-00765(ERROR / SPEC): msgNum: 1809638909 - Validation Error: [ VUID-vkDestroyPipeline-pipeline-00765 ] | MessageID = 0x6bdce5fd | vkDestroyPipeline():  can't be called on VkPipeline 0xe88693000000000c[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to pipeline must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyPipeline-pipeline-00765)
    Objects: 0
VUID-vkDestroyRenderPass-renderPass-00873(ERROR / SPEC): msgNum: 1194727853 - Validation Error: [ VUID-vkDestroyRenderPass-renderPass-00873 ] | MessageID = 0x473619ad | vkDestroyRenderPass():  can't be called on VkRenderPass 0xf443490000000006[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to renderPass must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyRenderPass-renderPass-00873)
    Objects: 0
VUID-vkDestroyBuffer-buffer-00922(ERROR / SPEC): msgNum: -464217071 - Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0x1dc49b00000000b2[] that is currently in use by VkDescriptorSet 0x4f8a8b0000000046[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
    Objects: 0
VUID-vkDestroyBuffer-buffer-00922(ERROR / SPEC): msgNum: -464217071 - Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0x89e60f0000000042[] that is currently in use by VkCommandBuffer 0x55bafd118cf0[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
    Objects: 0
VUID-vkDestroyBuffer-buffer-00922(ERROR / SPEC): msgNum: -464217071 - Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0x1c252400000000b5[] that is currently in use by VkCommandBuffer 0x55bafd137230[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
    Objects: 0
VUID-vkDestroyBuffer-buffer-00922(ERROR / SPEC): msgNum: -464217071 - Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0x2602c100000000b8[] that is currently in use by VkDescriptorSet 0x7323f50000000048[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
    Objects: 0
VUID-vkDestroyBuffer-buffer-00922(ERROR / SPEC): msgNum: -464217071 - Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] | MessageID = 0xe4549c11 | vkDestroyBuffer():  can't be called on VkBuffer 0x2df7c500000000bc[] that is currently in use by VkCommandBuffer 0x55bafd139a60[]. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)
    Objects: 0
VUID-vkDestroyCommandPool-commandPool-00041(ERROR / SPEC): msgNum: -1387836198 - Validation Error: [ VUID-vkDestroyCommandPool-commandPool-00041 ] Object 0: handle = 0x55bafd118cf0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2e2941000000001f, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID = 0xad474cda | vkDestroyCommandPool():  (VkCommandBuffer 0x55bafd118cf0[]) is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)
    Objects: 2
        [0] 0x55bafd118cf0, type: 6, name: NULL
        [1] 0x2e2941000000001f, type: 25, name: NULL
VUID-vkDestroyCommandPool-commandPool-00041(ERROR / SPEC): msgNum: -1387836198 - Validation Error: [ VUID-vkDestroyCommandPool-commandPool-00041 ] Object 0: handle = 0x55bafd137230, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2e2941000000001f, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID = 0xad474cda | vkDestroyCommandPool():  (VkCommandBuffer 0x55bafd137230[]) is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)
    Objects: 2
        [0] 0x55bafd137230, type: 6, name: NULL
        [1] 0x2e2941000000001f, type: 25, name: NULL
VUID-vkDestroyCommandPool-commandPool-00041(ERROR / SPEC): msgNum: -1387836198 - Validation Error: [ VUID-vkDestroyCommandPool-commandPool-00041 ] Object 0: handle = 0x55bafd139a60, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x2e2941000000001f, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID = 0xad474cda | vkDestroyCommandPool():  (VkCommandBuffer 0x55bafd139a60[]) is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)
    Objects: 2
        [0] 0x55bafd139a60, type: 6, name: NULL
        [1] 0x2e2941000000001f, type: 25, name: NULL
VUID-vkDestroyFence-fence-01120(ERROR / SPEC): msgNum: 1562993224 - Validation Error: [ VUID-vkDestroyFence-fence-01120 ] Object 0: handle = 0x149d740000000087, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x5d296248 | vkDestroyFence(): fence (VkFence 0x149d740000000087[]) is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)
    Objects: 1
        [0] 0x149d740000000087, type: 7, name: NULL
VUID-vkDestroyFence-fence-01120(ERROR / SPEC): msgNum: 1562993224 - Validation Error: [ VUID-vkDestroyFence-fence-01120 ] Object 0: handle = 0x95ff2600000000b7, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x5d296248 | vkDestroyFence(): fence (VkFence 0x95ff2600000000b7[]) is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)
    Objects: 1
        [0] 0x95ff2600000000b7, type: 7, name: NULL
VUID-vkDestroyFence-fence-01120(ERROR / SPEC): msgNum: 1562993224 - Validation Error: [ VUID-vkDestroyFence-fence-01120 ] Object 0: handle = 0x2ec10700000000be, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x5d296248 | vkDestroyFence(): fence (VkFence 0x2ec10700000000be[]) is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)
    Objects: 1
        [0] 0x2ec10700000000be, type: 7, name: NULL

Thanks again for helping.

hakolao commented 7 months ago

Following fix it for me on windows:

  1. Update egui: egui = "0.27.0" (does nothing with regards to the issue, but needed it for compilation)
  2. Remove the link stuff in build.rs (might be just a windows issue, also needed it for compilation)
  3. Remove the first .then_signal_fence_and_flush() leaving only the one just before match future.map_err(Validated::unwrap). This gets rid of the errors (resource in use).
  4. Add timeout to swapchain acquire (e.g. Duration::from_millis(10).

This was a quick debug, so didn't dig deep into further... e.g. resizing crashes the app entirely on my machine.

Maybe this helps a bit.

freddycansic commented 7 months ago

Thanks for the response. Unfortunately none of these fixes have worked for me, I'm still experiencing the same crash. Commenting out gui.draw_on_image stops the crash so I'm pretty sure that is where the error originates.

Here's what I've done.

Updated egui version.

-egui = "0.26.0"
+egui = "0.27.0"

Added os specific targeting for build script.

 fn main() {
+    #[cfg(target_os = "linux")]
     println!(
         "cargo:rustc-link-search={}",
         std::env::var("NIX_LD_LIBRARY_PATH").unwrap_or_default()

Added in an aquire swapchain image timeout.

-        match acquire_next_image(self.rendering_context.swapchain.clone(), None)
+        match acquire_next_image(
+            self.rendering_context.swapchain.clone(),
+            Some(Duration::from_millis(10)),
+        )

Removed the first then_signal_fence_and_flush() call.

             .unwrap()
             .join(acquire_future)
             .then_execute(self.vulkan_context.queue.clone(), command_buffer)
-            .unwrap()
-            .then_signal_fence_and_flush()
             .unwrap();

Here's the full stacktrace.

The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: a validation error occurred

Caused by:
    access to a resource has been denied (resource use: Some(ResourceUseRef { command_index: 0, command_name: "begin_render_pass", resource_in_command: FramebufferAttachment { index: 0 }, secondary_use_ref: None }), error: the resource is already in use, and there is no tracking of concurrent usages)
Location: /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/command_buffer/traits.rs:215

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 9 frames hidden ⋮                               
  10: core::result::Result<T,E>::unwrap::hfa6837c5b0db220c
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/result.rs:1077
  11: <vulkano::command_buffer::traits::CommandBufferExecFuture<F> as vulkano::sync::future::GpuFuture>::flush::h2451a32eefdaa8a9
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/command_buffer/traits.rs:215
       213 │                 SubmitAnyBuilder::Empty => {}
       214 │                 SubmitAnyBuilder::CommandBuffer(submit_info, fence) => {
       215 >                     queue_submit(&self.queue, submit_info, fence, &self.previous).unwrap();
       216 │                 }
       217 │                 _ => unreachable!(),
  12: <alloc::boxed::Box<F> as vulkano::sync::future::GpuFuture>::flush::h4cfa5fbfc0d595a8
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/mod.rs:409
       407 │ 
       408 │     fn flush(&self) -> Result<(), Validated<VulkanError>> {
       409 >         (**self).flush()
       410 │     }
       411 │ 
  13: <vulkano::swapchain::acquire_present::PresentFuture<P> as vulkano::sync::future::GpuFuture>::build_submission::hb6cf1d8612f868ea
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/swapchain/acquire_present.rs:855
       853 │             }
       854 │             SubmitAnyBuilder::CommandBuffer(_, _) => {
       855 >                 self.previous.flush()?;
       856 │ 
       857 │                 SubmitAnyBuilder::QueuePresent(PresentInfo {
  14: vulkano::sync::future::fence_signal::FenceSignalFuture<F>::flush_impl::hd42a10f6e2910b8d
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/fence_signal.rs:233
       231 │                 Full(E),
       232 │             }
       233 >             let result = match previous.build_submission()? {
       234 │                 SubmitAnyBuilder::Empty => {
       235 │                     debug_assert!(!partially_flushed);
  15: <vulkano::sync::future::fence_signal::FenceSignalFuture<F> as vulkano::sync::future::GpuFuture>::flush::hc17eb5574540fb57
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/fence_signal.rs:432
       430 │     fn flush(&self) -> Result<(), Validated<VulkanError>> {
       431 │         let mut state = self.state.lock();
       432 >         self.flush_impl(&mut state)
       433 │     }
       434 │ 
  16: vulkano::sync::future::GpuFuture::then_signal_fence_and_flush::h5a015bc0e5f177c6
      at /home/freddy/.cargo/git/checkouts/vulkano-cb672043253a6e8d/18c88cd/vulkano/src/sync/future/mod.rs:327
       325 │     {
       326 │         let f = self.then_signal_fence();
       327 >         f.flush()?;
       328 │ 
       329 │         Ok(f)
  17: vulkano_teapot::app::App::render::hde1e518b26fceae3
      at /home/freddy/dev/vulkano-teapot/src/app.rs:373
       371 │         );
       372 │ 
       373 >         let future = gui_future
       374 │             .then_swapchain_present(
       375 │                 self.vulkan_context.queue.clone(),
  18: vulkano_teapot::app::App::run::{{closure}}::haa576b965f0210ac
      at /home/freddy/dev/vulkano-teapot/src/app.rs:215
       213 │                                     });
       214 │                                 });
       215 >                                 self.render(&mut frame_state);
       216 │                                 frame_state.frame_count = (frame_state.frame_count + 1) % u128::MAX;
       217 │                                 self.input.reset_just_released();
  19: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h1add303851441a63
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/ops/function.rs:294
  20: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h58121531202b027c
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/ops/function.rs:294
  21: winit::platform_impl::platform::x11::EventLoop<T>::single_iteration::h9d64587fa066db53
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:602
       600 │             for window_id in windows {
       601 │                 let window_id = crate::window::WindowId(window_id);
       602 >                 callback(
       603 │                     Event::WindowEvent {
       604 │                         window_id,
  22: winit::platform_impl::platform::x11::EventLoop<T>::poll_events_with_timeout::he65223d419ee84ac
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:541
       539 │         }
       540 │ 
       541 >         self.single_iteration(&mut callback, cause);
       542 │     }
       543 │ 
  23: winit::platform_impl::platform::x11::EventLoop<T>::pump_events::hb74d9afe36e95f35
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:447
       445 │         // request to Exit.
       446 │         if !self.exiting() {
       447 >             self.poll_events_with_timeout(timeout, &mut callback);
       448 │         }
       449 │         if let Some(code) = self.exit_code() {
  24: winit::platform_impl::platform::x11::EventLoop<T>::run_on_demand::h0cef644bcddab5df
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/mod.rs:408
       406 │ 
       407 │         let exit = loop {
       408 >             match self.pump_events(None, &mut event_handler) {
       409 │                 PumpStatus::Exit(0) => {
       410 │                     break Ok(());
  25: winit::platform_impl::platform::EventLoop<T>::run_on_demand::h307f2433570c534b
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/mod.rs:829
       827 │         F: FnMut(crate::event::Event<T>, &RootELW<T>),
       828 │     {
       829 >         x11_or_wayland!(match self; EventLoop(evlp) => evlp.run_on_demand(callback))
       830 │     }
       831 │ 
  26: winit::platform_impl::platform::EventLoop<T>::run::h33ae712bb3262232
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/mod.rs:822
       820 │         F: FnMut(crate::event::Event<T>, &RootELW<T>),
       821 │     {
       822 >         self.run_on_demand(callback)
       823 │     }
       824 │ 
  27: winit::event_loop::EventLoop<T>::run::h911c2925cb4825bc
      at /home/freddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/event_loop.rs:249
       247 │         F: FnMut(Event<T>, &EventLoopWindowTarget<T>),
       248 │     {
       249 >         self.event_loop.run(event_handler)
       250 │     }
       251 │ 
  28: vulkano_teapot::app::App::run::h5f8c91cd1faa1d49
      at /home/freddy/dev/vulkano-teapot/src/app.rs:131
       129 │         };
       130 │ 
       131 >         event_loop
       132 │             .run(move |event, event_loop_window_target| {
       133 │                 // println!("{:?}", event);
  29: vulkano_teapot::main::he78e220f056f2eae
      at /home/freddy/dev/vulkano-teapot/src/main.rs:27
        25 │ 
        26 │     let app = App::new(&event_loop);
        27 >     app.run(event_loop);
        28 │ }
  30: core::ops::function::FnOnce::call_once::h11a82bf5f4be8d24
      at /rustc/3c85e56249b0b1942339a6a989a971bf6f1c9e0f/library/core/src/ops/function.rs:250
                                ⋮ 16 frames hidden ⋮                              

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
[11:05:59 ERROR vulkano_teapot::debug] [VUID-vkDestroyFramebuffer-framebuffer-00892] [validation] Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0x993a4d000000008f[] that is currently in use by VkCommandBuffer 0x55e9927df630[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
[11:05:59 ERROR vulkano_teapot::debug] [VUID-vkDestroyFramebuffer-framebuffer-00892] [validation] Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0xd68cbb0000000091[] that is currently in use by VkCommandBuffer 0x55e9927e3140[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
VUID-vkDestroyFramebuffer-framebuffer-00892(ERROR / SPEC): msgNum: -617577710 - Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0x2723ba0000000037[] that is currently in use by VkCommandBuffer 0x55e9924c80b0[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
    Objects: 0
VUID-vkDestroyFramebuffer-framebuffer-00892(ERROR / SPEC): msgNum: -617577710 - Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] | MessageID = 0xdb308312 | vkDestroyFramebuffer():  can't be called on VkFramebuffer 0x944a2c0000000039[] that is currently in use by VkCommandBuffer 0x55e9924cb740[]. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
    Objects: 0
VUID-vkDestroyImage-image-01000(ERROR / SPEC): msgNum: -221078694 - Validation Error: [ VUID-vkDestroyImage-image-01000 ] | MessageID = 0xf2d29b5a | vkDestroyImage():  can't be called on VkImage 0x2b424a0000000034[] that is currently in use by VkCommandBuffer 0x55e9924cb740[]. The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyImage-image-01000)
    Objects: 0
VUID-vkDestroyPipeline-pipeline-00765(ERROR / SPEC): msgNum: 1809638909 - Validation Error: [ VUID-vkDestroyPipeline-pipeline-00765 ] | MessageID = 0x6bdce5fd | vkDestroyPipeline():  can't be called on VkPipeline 0xe88693000000000c[] that is currently in use by VkCommandBuffer 0x55e9924cb740[]. The Vulkan spec states: All submitted commands that refer to pipeline must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyPipeline-pipeline-00765)
    Objects: 0
VUID-vkDestroyRenderPass-renderPass-00873(ERROR / SPEC): msgNum: 1194727853 - Validation Error: [ VUID-vkDestroyRenderPass-renderPass-00873 ] | MessageID = 0x473619ad | vkDestroyRenderPass():  can't be called on VkRenderPass 0xf443490000000006[] that is currently in use by VkCommandBuffer 0x55e9924cb740[]. The Vulkan spec states: All submitted commands that refer to renderPass must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyRenderPass-renderPass-00873)
    Objects: 0
VUID-vkDestroyCommandPool-commandPool-00041(ERROR / SPEC): msgNum: -1387836198 - Validation Error: [ VUID-vkDestroyCommandPool-commandPool-00041 ] Object 0: handle = 0x55e9924cb740, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xd10d270000000018, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID = 0xad474cda | vkDestroyCommandPool():  (VkCommandBuffer 0x55e9924cb740[]) is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)
    Objects: 2
        [0] 0x55e9924cb740, type: 6, name: NULL
        [1] 0xd10d270000000018, type: 25, name: NULL
VUID-vkDestroyCommandPool-commandPool-00041(ERROR / SPEC): msgNum: -1387836198 - Validation Error: [ VUID-vkDestroyCommandPool-commandPool-00041 ] Object 0: handle = 0x55e9924c80b0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xd10d270000000018, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID = 0xad474cda | vkDestroyCommandPool():  (VkCommandBuffer 0x55e9924c80b0[]) is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)
    Objects: 2
        [0] 0x55e9924c80b0, type: 6, name: NULL
        [1] 0xd10d270000000018, type: 25, name: NULL
VUID-vkDestroyFence-fence-01120(ERROR / SPEC): msgNum: 1562993224 - Validation Error: [ VUID-vkDestroyFence-fence-01120 ] Object 0: handle = 0xd3dd54000000008e, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x5d296248 | vkDestroyFence(): fence (VkFence 0xd3dd54000000008e[]) is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)
    Objects: 1
        [0] 0xd3dd54000000008e, type: 7, name: NULL
VUID-vkDestroyFence-fence-01120(ERROR / SPEC): msgNum: 1562993224 - Validation Error: [ VUID-vkDestroyFence-fence-01120 ] Object 0: handle = 0x176083000000005f, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x5d296248 | vkDestroyFence(): fence (VkFence 0x176083000000005f[]) is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)
    Objects: 1
        [0] 0x176083000000005f, type: 7, name: NULL
VUID-vkDestroyFence-fence-01120(ERROR / SPEC): msgNum: 1562993224 - Validation Error: [ VUID-vkDestroyFence-fence-01120 ] Object 0: handle = 0xe9b2ee0000000094, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x5d296248 | vkDestroyFence(): fence (VkFence 0xe9b2ee0000000094[]) is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)
    Objects: 1
        [0] 0xe9b2ee0000000094, type: 7, name: NULL

Here's a link to the updated git repository https://github.com/freddycansic/vulkano-teapot/tree/4bbedd05e4f5cf31b0a918d65a918be21fca5aab

freddycansic commented 7 months ago

Update: The lag does not occur on WSL2. Although I can't seem to make the GUI appear at all, I can still feel the lag through non-GUI keybinds (i.e. move camera forward) which makes me think this might be a winit issue. I'm really not sure.

freddycansic commented 6 months ago

Update: Lag appears on gnome too, its my code for sure.