Dynamically detect surface size limits on WGPU (#50340) (cherry-pick to preview) (#50348)
Conrad Irwin
and
John Tur
created
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>