-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lagging GUI #69
Comments
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 |
Thank you for the quick response. Unfortunately none of these fixes have solved my problem. Also now I've updated the
Thanks again for helping. |
Following fix it for me on windows:
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. |
Thanks for the response. Here's what I've done. Updated -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 .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.
Here's a link to the updated git repository https://github.com/freddycansic/vulkano-teapot/tree/4bbedd05e4f5cf31b0a918d65a918be21fca5aab |
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 |
Update: Lag appears on gnome too, its my code for sure. |
Expected Behaviour
GUI is responsive
Observed Behaviour
There is a long lag time between interacting with GUI elements and them responding.
Environment
Video
lagging-gui.mp4
Code
I'm using approach 4 to ensure egui renders into the correct color space.
Enable
khr_swapchain_mutable_format
.Create swapchain with
SwapchainCreateFlags::MUTABLE_FORMAT
.Create
Format::R8G8B8A8_UNORM
image views of swapchain images.Initialise
Gui
object with correct image view format.Create GUI elements in render loop.
Render scene and GUI then present.
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 :)
The text was updated successfully, but these errors were encountered: