mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Re-sort view formats (#3444)
This commit is contained in:
committed by
GitHub
parent
7826092d86
commit
4ea31598a0
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user