Fix adapter selection loop in iced_wgpu
This commit is contained in:
parent
0b28080d3e
commit
9b9b37e6f8
1 changed files with 4 additions and 6 deletions
|
|
@ -98,8 +98,9 @@ impl<Theme> Compositor<Theme> {
|
||||||
..limits
|
..limits
|
||||||
});
|
});
|
||||||
|
|
||||||
let (device, queue) = loop {
|
let (device, queue) =
|
||||||
if let Some(limits) = limits.next() {
|
loop {
|
||||||
|
let limits = limits.next()?;
|
||||||
let device = adapter.request_device(
|
let device = adapter.request_device(
|
||||||
&wgpu::DeviceDescriptor {
|
&wgpu::DeviceDescriptor {
|
||||||
label: Some(
|
label: Some(
|
||||||
|
|
@ -114,10 +115,7 @@ impl<Theme> Compositor<Theme> {
|
||||||
if let Some(device) = device {
|
if let Some(device) = device {
|
||||||
break Some(device);
|
break Some(device);
|
||||||
}
|
}
|
||||||
}
|
}?;
|
||||||
|
|
||||||
break None;
|
|
||||||
}?;
|
|
||||||
|
|
||||||
Some(Compositor {
|
Some(Compositor {
|
||||||
instance,
|
instance,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue