Repository navigation
Commit 4d16003
winit-wgpu: clamp requested device limits to the adapter
Requesting any limit above adapter support fails device creation
outright, and downlevel adapters sit below the WebGPU defaults — the
iOS simulator's emulated GPU offers max_inter_stage_shader_variables
15 vs the default 16, so the showcase died at request_device and the
window stayed black. Clamp Limits::default() with
or_worse_values_from(&adapter.limits()); on desktop-class GPUs the
clamp is a no-op. The renderer's shaders use at most 8 inter-stage
variables (max @location(7)), so degraded limits are validated where
they actually bind: pipeline and resource creation.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 93c419e commit 4d16003
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
1117 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
1118 | 1127 | | |
1119 | 1128 | | |
1120 | 1129 | | |
| |||
0 commit comments