File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ Bottom level categories:
53
53
54
54
- Fix surface creation crashing on iOS. By @mockersf in [ #6535 ] ( https://github.com/gfx-rs/wgpu/pull/6535 )
55
55
56
+ #### Vulkan
57
+
58
+ - Fix surface capabilities being advertised when its query failed. By @wumpf in [ #6510 ] ( https://github.com/gfx-rs/wgpu/pull/6510 )
59
+
56
60
## 23.0.0 (2024-10-25)
57
61
58
62
### Themes of this release
Original file line number Diff line number Diff line change @@ -2254,7 +2254,8 @@ impl crate::Adapter for super::Adapter {
2254
2254
Ok ( present_modes) => present_modes,
2255
2255
Err ( e) => {
2256
2256
log:: error!( "get_physical_device_surface_present_modes: {}" , e) ;
2257
- Vec :: new ( )
2257
+ // Per definition of `SurfaceCapabilities`, there must be at least one present mode.
2258
+ return None ;
2258
2259
}
2259
2260
}
2260
2261
} ;
@@ -2269,7 +2270,8 @@ impl crate::Adapter for super::Adapter {
2269
2270
Ok ( formats) => formats,
2270
2271
Err ( e) => {
2271
2272
log:: error!( "get_physical_device_surface_formats: {}" , e) ;
2272
- Vec :: new ( )
2273
+ // Per definition of `SurfaceCapabilities`, there must be at least one present format.
2274
+ return None ;
2273
2275
}
2274
2276
}
2275
2277
} ;
Original file line number Diff line number Diff line change @@ -702,10 +702,7 @@ impl crate::Context for ContextWgpuCore {
702
702
. surface_get_capabilities ( surface_data. id , * adapter_data)
703
703
{
704
704
Ok ( caps) => caps,
705
- Err ( wgc:: instance:: GetSurfaceSupportError :: Unsupported ) => {
706
- wgt:: SurfaceCapabilities :: default ( )
707
- }
708
- Err ( err) => self . handle_error_fatal ( err, "Surface::get_supported_formats" ) ,
705
+ Err ( _) => wgt:: SurfaceCapabilities :: default ( ) ,
709
706
}
710
707
}
711
708
You can’t perform that action at this time.
0 commit comments