render: request_device asks for default limits, so the atlas clamp never runs on a 2048 adapter #387

Closed
opened 2026-09-25 00:48:14 +09:00 by natsukium · 0 comments
Owner

REQ-1005/REQ-1006 (spec.md) say the atlas sizes "clamp to the adapter's reported limit", but the clamp probably never gets to run on a small adapter.

  • crates/felis-render-wgpu/src/lib.rs (~354-357) calls request_device with required_limits: wgpu::Limits::default(), which requires max_texture_dimension_2d = 8192.
  • An adapter whose limit is 2048 (GLES 3.1 / D3D11 downlevel) would fail at request_device before any atlas clamp is computed.

Unverified on real downlevel hardware. Likely fix: request adapter.limits() (or Limits::downlevel_defaults().using_resolution(adapter.limits())) and keep the clamp. Then either confirm the spec wording or narrow it.

REQ-1005/REQ-1006 (spec.md) say the atlas sizes "clamp to the adapter's reported limit", but the clamp probably never gets to run on a small adapter. - `crates/felis-render-wgpu/src/lib.rs` (~354-357) calls `request_device` with `required_limits: wgpu::Limits::default()`, which requires `max_texture_dimension_2d = 8192`. - An adapter whose limit is 2048 (GLES 3.1 / D3D11 downlevel) would fail at `request_device` before any atlas clamp is computed. Unverified on real downlevel hardware. Likely fix: request `adapter.limits()` (or `Limits::downlevel_defaults().using_resolution(adapter.limits())`) and keep the clamp. Then either confirm the spec wording or narrow it.
Commenting is not possible because the repository is archived.
No description provided.