Files
lightcraft/apps
Jason LukerandClaude Opus 5.5 2dd02f6f97 PERF-WINDOW: the window queues one frame, not two (eframe's low-latency surface)
window_gpu::base_options() built the window's wgpu options from
egui_wgpu::WgpuConfiguration::default(), which is egui-wgpu's HIGH_THROUGHPUT
surface (desired_maximum_frame_latency 2; three drawables on Metal), not
eframe's default. eframe's NativeOptions::default() uses LOW_LATENCY
(latency 1). The window had eframe's default until #136 started building
the options by hand to choose the backends.

Start from eframe::NativeOptions::default().wgpu_options and change only
the backends, the DX12 compiler and the instance flags, as before. The
probed Windows configurations are built on the same options.

Measured on an M2 Max at 120 Hz (Metal System Trace, heavy develop drag,
presents joined to WindowServer's reads of the same IOSurface): the window
cycles 2 drawables instead of 3, and a frame reaches the compositor about
8.3 ms (one frame) sooner, 9.5-10.6 ms instead of 17.9-18.9 ms after it is
presented, at the same ~119 frames a second.

Test: window_gpu::tests::window_surface_keeps_one_frame_in_flight (fails
on the old options: latency Some(2) instead of Some(1)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:19:57 -07:00
..
2026-10-23 17:21:16 -04:00