Skip to content

fix(lambda-rs-platform): Respect WindowBuilder vsync in render surface configuration - #175

Merged
vmarcella merged 2 commits into
mainfrom
vmrcella/fix-vsync-in-render
Feb 7, 2026
Merged

fix(lambda-rs-platform): Respect WindowBuilder vsync in render surface configuration#175
vmarcella merged 2 commits into
mainfrom
vmrcella/fix-vsync-in-render

Conversation

@vmarcella

@vmarcellavmarcella commented Feb 7, 2026

Copy link
Copy Markdown
Member

Summary

Fixes vsync configuration being effectively ignored in some cases by ensuring
the requested present mode is respected end-to-end and that “vsync off”
fallbacks prefer true non-vsync modes when available.

Related Issues

Changes

  • Respect window vsync preference when building a RenderContext (when no explicit present mode is set).
  • Prefer AutoNoVsync over Mailbox when the caller requests non-vsync presentation but the adapter does not support Immediate.
  • Add unit tests covering present mode resolution and platform present-mode fallback ordering.
  • Clarify WindowBuilder::with_vsync docs (best-effort based on platform capabilities).

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (updates to docs, specs, tutorials, or comments)
  • Refactor (code change that neither fixes a bug nor adds a feature)
  • Performance (change that improves performance)
  • Test (adding or updating tests)
  • Build/CI (changes to build process or CI configuration)

Affected Crates

  • lambda-rs
  • lambda-rs-platform
  • lambda-rs-args
  • lambda-rs-logging
  • Other:

Checklist

  • Code follows the repository style guidelines (cargo +nightly fmt --all)
  • Code passes clippy (cargo clippy --workspace --all-targets -- -D warnings)
  • Tests pass (cargo test --workspace)
  • New code includes appropriate documentation
  • Public API changes are documented
  • Breaking changes are noted in this PR description

Testing

Commands run:

cargo test -p lambda-rs-platform --lib
cargo test -p lambda-rs --lib

Manual verification steps (if applicable):

  1. (Optional) Run a demo with WindowBuilder::with_vsync(false) and confirm frame pacing is no longer refresh-capped on platforms that support non-vsync modes.

Screenshots/Recordings

N/A

Platform Testing

  • macOS
  • Windows
  • Linux

Additional Notes

…that vsync/no vsync requests are more likely to be satisfied
Comment threadcrates/lambda-rs/src/render/mod.rs Fixed
Comment threadcrates/lambda-rs/src/render/mod.rs Fixed
@github-actions

github-actionsBot commented Feb 7, 2026

Copy link
Copy Markdown

✅ Coverage Report

📊 View Full HTML Report (download artifact)

Overall Coverage

MetricValue
Total Line Coverage45.35%
Lines Covered5064 / 11166

Changed Files in This PR

FileCoverageLines
crates/lambda-rs-platform/src/wgpu/surface.rs26.71%74/277
crates/lambda-rs/src/render/mod.rs8.42%58/689
crates/lambda-rs/src/render/window.rs0.00%0/63

PR Files Coverage: 12.82% (132/1029 lines)


Generated by cargo-llvm-cov · Latest main coverage

Last updated: 2026-02-07 22:01:48 UTC · Commit: 153dc64

@vmarcellavmarcella added lambda-rs Issues pertaining to the core framework lambda-rs-platform Issues pertaining to the dependency & platform wrappers render All things render related labels Feb 7, 2026
@vmarcella
vmarcella merged commit 0392012 into mainFeb 7, 2026
10 checks passed
@vmarcella
vmarcella deleted the vmrcella/fix-vsync-in-render branch February 7, 2026 22:13
@vmarcellavmarcella changed the title Respect WindowBuilder vsync in render surface configurationfix(lambda-rs-platform): Respect WindowBuilder vsync in render surface configurationFeb 8, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lambda-rsIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersrenderAll things render related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] WindowBuilder::with_vsync is a no-op; present mode hardcoded to Fifo

2 participants

@vmarcella@github-advanced-security