Skip to content
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

Add WgpuConfiguration::desired_maximum_frame_latency #3874

Merged
merged 4 commits into from Jan 24, 2024

Conversation

emilk
Copy link
Owner

@emilk emilk commented Jan 23, 2024

Setting desired_maximum_frame_latency to a low value should theoretically lead to lower latency in winit apps using egui-wgpu (e.g. in eframe with wgpu backend).


It seems like desired_maximum_frame_latency has no effect on my Mac. I lowered my monitor refresh-rate to 30Hz to test, and can see no difference between desired_maximum_frame_latency of 0 or 3.

Before when experimenting with changing the global DESIRED_NUM_FRAMES in wgpu I saw a huge difference, so I wonder what has changed.

I verified that set_maximum_drawable_count is being called with either 1 or 2, but I perceive no difference between the two.

@emilk emilk changed the title Add WgpuConfiguration::desired_maximum_frame_latency, default to 1 Add WgpuConfiguration::desired_maximum_frame_latency Jan 23, 2024
@emilk emilk marked this pull request as ready for review January 23, 2024 13:59
Copy link
Collaborator

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what could possibly go wrong now 😄 🚢

@emilk emilk merged commit 4d1a736 into master Jan 24, 2024
35 checks passed
@emilk emilk deleted the emilk/low-latency-wgpu branch January 24, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe egui-wgpu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants