Fix validation for surface_capabilities regarding full-screen exclusive (#2410)

This commit is contained in:
Rua 2023-11-17 16:21:20 +01:00 committed by GitHub
parent e68eddd5f1
commit 9553b77bd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2006,26 +2006,26 @@ impl PhysicalDevice {
}
match (
surface.api() == SurfaceApi::Win32
&& full_screen_exclusive == FullScreenExclusive::ApplicationControlled,
full_screen_exclusive != FullScreenExclusive::Default,
win32_monitor.is_some(),
) {
(true, false) => {
return Err(Box::new(ValidationError {
problem: "`surface` is a Win32 surface, and \
`surface_info.full_screen_exclusive` is \
`FullScreenExclusive::ApplicationControlled`, but \
problem: "`surface_info.full_screen_exclusive` is not \
`FullScreenExclusive::Default`, but \
`surface_info.win32_monitor` is `None`"
.into(),
vuids: &["VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-02672"],
vuids: &[
"VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-02672",
"VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-02671",
],
..Default::default()
}));
}
(false, true) => {
return Err(Box::new(ValidationError {
problem: "`surface` is not a Win32 surface, or \
`surface_info.full_screen_exclusive` is not \
`FullScreenExclusive::ApplicationControlled`, but \
problem: "`surface_info.full_screen_exclusive` is \
`FullScreenExclusive::Default`, but \
`surface_info.win32_monitor` is `Some`"
.into(),
..Default::default()