Select surface formats with no required features in iced_wgpu
This commit is contained in:
parent
c538311ee0
commit
ea614387f4
1 changed files with 5 additions and 1 deletions
|
|
@ -105,10 +105,14 @@ impl Compositor {
|
||||||
.and_then(|surface| {
|
.and_then(|surface| {
|
||||||
let capabilities = surface.get_capabilities(&adapter);
|
let capabilities = surface.get_capabilities(&adapter);
|
||||||
|
|
||||||
let mut formats = capabilities.formats.iter().copied();
|
let formats = capabilities.formats.iter().copied();
|
||||||
|
|
||||||
log::info!("Available formats: {formats:#?}");
|
log::info!("Available formats: {formats:#?}");
|
||||||
|
|
||||||
|
let mut formats = formats.filter(|format| {
|
||||||
|
format.required_features() == wgpu::Features::empty()
|
||||||
|
});
|
||||||
|
|
||||||
let format = if color::GAMMA_CORRECTION {
|
let format = if color::GAMMA_CORRECTION {
|
||||||
formats.find(wgpu::TextureFormat::is_srgb)
|
formats.find(wgpu::TextureFormat::is_srgb)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue