Skip to content

Dynamically detect surface size limits on WGPU (#50340) (cherry-pick to preview)#50348

Merged
ConradIrwin merged 1 commit intov0.226.xfrom
cherry-pick-50340-to-preview
Feb 27, 2026
Merged

Dynamically detect surface size limits on WGPU (#50340) (cherry-pick to preview)#50348
ConradIrwin merged 1 commit intov0.226.xfrom
cherry-pick-50340-to-preview

Conversation

@ConradIrwin
Copy link
Copy Markdown
Member

Cherry-pick of #50340 to the preview branch (v0.226.x).

The original PR changed wgpu::Limits::downlevel_defaults() to include .using_resolution(adapter.limits()).using_alignment(adapter.limits()) to dynamically detect surface size limits.

This cherry-pick required conflict resolution because the preview branch has a different code structure:

  • Preview uses a synchronous create_device function with smol::block_on
  • Preview doesn't have the WASM-related code paths
  • Preview used wgpu::Limits::default() instead of wgpu::Limits::downlevel_defaults()

The change was adapted to apply the fix (downlevel_defaults() + .using_resolution() + .using_alignment()) to the preview branch's code structure.

Release Notes:

  • N/A

Fallout from #50270

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 27, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 27, 2026
@ConradIrwin ConradIrwin merged commit 97db1f6 into v0.226.x Feb 27, 2026
51 of 53 checks passed
@ConradIrwin ConradIrwin deleted the cherry-pick-50340-to-preview branch February 27, 2026 21:36
ConradIrwin added a commit that referenced this pull request Mar 2, 2026
…to preview) (#50348)

Cherry-pick of #50340 to the preview branch (v0.226.x).

The original PR changed `wgpu::Limits::downlevel_defaults()` to include
`.using_resolution(adapter.limits()).using_alignment(adapter.limits())`
to dynamically detect surface size limits.

This cherry-pick required conflict resolution because the preview branch
has a different code structure:
- Preview uses a synchronous `create_device` function with
`smol::block_on`
- Preview doesn't have the WASM-related code paths
- Preview used `wgpu::Limits::default()` instead of
`wgpu::Limits::downlevel_defaults()`

The change was adapted to apply the fix (`downlevel_defaults()` +
`.using_resolution()` + `.using_alignment()`) to the preview branch's
code structure.

Release Notes:

- N/A

Co-authored-by: John Tur <john-tur@outlook.com>
(cherry picked from commit 97db1f6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants