File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -412,13 +412,13 @@ impl Surface {
412
412
& self ,
413
413
adapter : & hal:: DynExposedAdapter ,
414
414
) -> Result < hal:: SurfaceCapabilities , GetSurfaceSupportError > {
415
- let backend = adapter. backend ( ) ;
416
415
let suf = self
417
- . raw ( backend)
418
- . ok_or ( GetSurfaceSupportError :: NotSupportedByBackend ( backend ) ) ?;
416
+ . raw ( adapter . backend ( ) )
417
+ . ok_or ( GetSurfaceSupportError :: Unsupported ) ?;
419
418
profiling:: scope!( "surface_capabilities" ) ;
420
419
let caps = unsafe { adapter. adapter . surface_capabilities ( suf) }
421
- . ok_or ( GetSurfaceSupportError :: FailedToRetrieveSurfaceCapabilitiesForAdapter ) ?;
420
+ . ok_or ( GetSurfaceSupportError :: Unsupported ) ?;
421
+
422
422
Ok ( caps)
423
423
}
424
424
@@ -649,10 +649,8 @@ crate::impl_storage_item!(Adapter);
649
649
#[ derive( Clone , Debug , Error ) ]
650
650
#[ non_exhaustive]
651
651
pub enum GetSurfaceSupportError {
652
- #[ error( "Surface is not supported for the specified backend {0}" ) ]
653
- NotSupportedByBackend ( Backend ) ,
654
- #[ error( "Failed to retrieve surface capabilities for the specified adapter." ) ]
655
- FailedToRetrieveSurfaceCapabilitiesForAdapter ,
652
+ #[ error( "Surface is not supported by the adapter" ) ]
653
+ Unsupported ,
656
654
}
657
655
658
656
#[ derive( Clone , Debug , Error ) ]
You can’t perform that action at this time.
0 commit comments