Skip to content

Commit

Permalink
Merge branch 'fix-3095' of https://github.com/seabassjh/wgpu into fix…
Browse files Browse the repository at this point in the history
…-3095
  • Loading branch information
seabassjh committed Mar 31, 2023
2 parents a28ef46 + 7999db1 commit a1e644f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wgpu-hal/src/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ unsafe extern "system" fn debug_utils_messenger_callback(
callback_data_ptr: *const vk::DebugUtilsMessengerCallbackDataEXT,
_user_data: *mut c_void,
) -> vk::Bool32 {
const VUID_VKSWAPCHAINCREATEINFOKHR_IMAGEEXTENT_01274: i32 = 0x7cd0911d;
use std::borrow::Cow;

if thread::panicking() {
return vk::FALSE;
}
Expand All @@ -42,6 +44,12 @@ unsafe extern "system" fn debug_utils_messenger_callback(
unsafe { CStr::from_ptr(cd.p_message) }.to_string_lossy()
};

// Silence Vulkan Validation error "VUID-VkSwapchainCreateInfoKHR-imageExtent-01274"
// - it's a false positive due to the inherent racy-ness of surface resizing
if cd.message_id_number == VUID_VKSWAPCHAINCREATEINFOKHR_IMAGEEXTENT_01274 {
return vk::FALSE;
}

let _ = std::panic::catch_unwind(|| {
log::log!(
level,
Expand Down

0 comments on commit a1e644f

Please sign in to comment.