linebender / linebender/vello

Platform unsupported `PresentMode` in `create_surface` can cause unrecoverable panic, with no fallback behavior

Open
#721 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
4.3k
Forks
300
Avg merge
2d 13h
Merged PRs (30d)
61

Description

If you provide a PresentMode in RenderContext::create_surface which is not supported by the platform (e.g. Immediate or FifoRelaxed while on Wayland), it will panic while configuring the surface. The only current way to work around this with released Vello is to write your own version of portions of util.

It may be more helpful to have safe fallback (probably AutoVsync) here, since this is meant to be a convenience function.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at RenderContext::create_surface and inspect how the requested PresentMode is passed to platform surface configuration, especially for Wayland. Compare the behavior for unsupported Immediate or FifoRelaxed modes with the requested AutoVsync fallback. Done means unsupported modes no longer cause an unrecoverable panic and instead use safe fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.