srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/state/lifecycle.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-05-15 20:45:00 +0200
committersrdusr <[email protected]>2025-05-15 20:45:00 +0200
commit54195f079810410eb9456348e7e44d382d3c4d3f (patch)
tree2e7a2a47c66eeec8a3762e8b4a04124e8227f9ab /crates/wayland/src/state/lifecycle.rs
parent317b3b269cc526b410b6d0c0666e16ae84832ef9 (diff)
downloadsrdwm-54195f079810410eb9456348e7e44d382d3c4d3f.tar.gz
srdwm-54195f079810410eb9456348e7e44d382d3c4d3f.zip
Extend GPU rendering to every head, not just the first
Phase 2 of the GPU-rendering plan deliberately targeted a single head (GpuContext::output: Option<(crtc::Handle, GpuOutput)>) as a narrow proof that GBM+EGL+DrmCompositor rendering works at all on this hardware. DrmOutputManager already supports driving several crtcs at once - initialize_output is a per-crtc call on one shared manager, the same way anvil drives multiple outputs - so this was purely an unexercised restriction, not an architectural limit. GpuContext::output is now GpuContext::outputs: Vec<(crtc::Handle, GpuOutput)>, and udev/platform.rs calls initialize_output for every connected head in its own bring-up loop instead of only the first after that loop finishes. A head this fails for individually (already logged, not fatal) still just has no entry and falls back to the existing legacy Pixman path, unchanged from before. session.rs's VBlank handler and its VT-switch resume path (which excludes GPU-driven crtcs from the legacy set_crtc reassert loop, a different device fd that must never issue mode-set commands against a crtc DrmOutputManager already owns) both now look a crtc up in the Vec instead of comparing against a single stored one. render.rs's own render-loop lookup uses direct field access (gpu.outputs.iter_mut().find(...)) rather than an equivalent &mut self method: the borrow checker treats a method call as borrowing all of GpuContext, including gpu.renderer needed a few lines later for the same head, where direct field access lets it see the two borrows are disjoint. Still gated behind SRDWM_GPU=1 (unset by default) and untested on real multi-monitor hardware with the flag on - this machine has one display, so the actual multi-head path itself only gets exercised whenever it's set on hardware that has more than one.
Diffstat (limited to 'crates/wayland/src/state/lifecycle.rs')
0 files changed, 0 insertions, 0 deletions