mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
Re-sort view formats (#3444)
This commit is contained in:
parent
37d24fba00
commit
7b336805f1
@ -3329,7 +3329,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
) -> Result<wgt::SurfaceCapabilities, instance::GetSurfaceSupportError> {
|
||||
profiling::scope!("Surface::get_capabilities");
|
||||
self.fetch_adapter_and_surface::<A, _, _>(surface_id, adapter_id, |adapter, surface| {
|
||||
let hal_caps = surface.get_capabilities(adapter)?;
|
||||
let mut hal_caps = surface.get_capabilities(adapter)?;
|
||||
|
||||
hal_caps.formats.sort_by_key(|f| !f.describe().srgb);
|
||||
|
||||
Ok(wgt::SurfaceCapabilities {
|
||||
formats: hal_caps.formats,
|
||||
|
Loading…
Reference in New Issue
Block a user