Introduce a format blacklist in iced_wgpu
This commit is contained in:
parent
5f97135c3d
commit
00bb0162d1
1 changed files with 9 additions and 4 deletions
|
|
@ -210,10 +210,15 @@ impl Compositor {
|
|||
|
||||
log::info!("Available formats: {formats:#?}");
|
||||
|
||||
let mut formats =
|
||||
formats.filter(|format: &wgpu::TextureFormat| {
|
||||
format.required_features() == wgpu::Features::empty()
|
||||
});
|
||||
const BLACKLIST: &[wgpu::TextureFormat] = &[
|
||||
wgpu::TextureFormat::Rgb10a2Unorm,
|
||||
wgpu::TextureFormat::Rgb10a2Uint,
|
||||
];
|
||||
|
||||
let mut formats = formats.filter(|format| {
|
||||
format.required_features() == wgpu::Features::empty()
|
||||
&& !BLACKLIST.contains(format)
|
||||
});
|
||||
|
||||
let format = if color::GAMMA_CORRECTION {
|
||||
formats.find(wgpu::TextureFormat::is_srgb)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue