-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[hal vulkan] Clean up Vulkan Validation Layer callback. #9909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jimblandy
wants to merge
1
commit into
gfx-rs:trunk
Choose a base branch
from
jimblandy:hal-vulkan-clean-up-old-vuid-suppressions
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2
−38
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,21 +26,6 @@ unsafe extern "system" fn debug_utils_messenger_callback( | |
| let cd = unsafe { &*callback_data_ptr }; | ||
| let user_data = unsafe { &*user_data.cast::<super::DebugUtilsMessengerUserData>() }; | ||
|
|
||
| const VUID_VKCMDENDDEBUGUTILSLABELEXT_COMMANDBUFFER_01912: i32 = 0x56146426; | ||
| if cd.message_id_number == VUID_VKCMDENDDEBUGUTILSLABELEXT_COMMANDBUFFER_01912 { | ||
| // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5671 | ||
| // Versions 1.3.240 through 1.3.250 return a spurious error here if | ||
| // the debug range start and end appear in different command buffers. | ||
| if let Some(layer_properties) = user_data.validation_layer_properties.as_ref() { | ||
| if layer_properties.layer_description.as_ref() == c"Khronos Validation Layer" | ||
| && layer_properties.layer_spec_version >= vk::make_api_version(0, 1, 3, 240) | ||
| && layer_properties.layer_spec_version <= vk::make_api_version(0, 1, 3, 250) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: CI is failing on a warning now that these |
||
| { | ||
| return vk::FALSE; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Silence Vulkan Validation error "VUID-VkSwapchainCreateInfoKHR-pNext-07781" | ||
| // This happens when a surface is configured with a size outside the allowed extent. | ||
| // It's a false positive due to the inherent racy-ness of surface resizing. | ||
|
|
@@ -49,30 +34,9 @@ unsafe extern "system" fn debug_utils_messenger_callback( | |
| return vk::FALSE; | ||
| } | ||
|
|
||
| // Silence Vulkan Validation error "VUID-VkRenderPassBeginInfo-framebuffer-04627" | ||
| // if the OBS layer is enabled. This is a bug in the OBS layer. As the OBS layer | ||
| // does not have a version number they increment, there is no way to qualify the | ||
| // suppression of the error to a specific version of the OBS layer. | ||
| // | ||
| // See https://github.com/obsproject/obs-studio/issues/9353 | ||
| const VUID_VKRENDERPASSBEGININFO_FRAMEBUFFER_04627: i32 = 0x45125641; | ||
| if cd.message_id_number == VUID_VKRENDERPASSBEGININFO_FRAMEBUFFER_04627 | ||
| && user_data.has_obs_layer | ||
| { | ||
| return vk::FALSE; | ||
| } | ||
|
|
||
| // Silence Vulkan Validation error "VUID-vkCmdCopyImageToBuffer-pRegions-00184". | ||
| // While we aren't sure yet, we suspect this is probably a VVL issue. | ||
| // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/9276 | ||
| const VUID_VKCMDCOPYIMAGETOBUFFER_PREGIONS_00184: i32 = 0x45ef177c; | ||
| if cd.message_id_number == VUID_VKCMDCOPYIMAGETOBUFFER_PREGIONS_00184 { | ||
| return vk::FALSE; | ||
| } | ||
|
|
||
| // Silence Vulkan Validation error "VUID-StandaloneSpirv-None-10684". | ||
| // | ||
| // This is a bug. To prevent massive noise in the tests, lets suppress it for now. | ||
| // This is our bug. To prevent massive noise in the tests, let's suppress it for now. | ||
| // https://github.com/gfx-rs/wgpu/issues/7696 | ||
| const VUID_STANDALONESPIRV_NONE_10684: i32 = 0xb210f7c2_u32 as i32; | ||
| if cd.message_id_number == VUID_STANDALONESPIRV_NONE_10684 { | ||
|
|
@@ -81,7 +45,7 @@ unsafe extern "system" fn debug_utils_messenger_callback( | |
|
|
||
| let level = match message_severity { | ||
| // We intentionally suppress info messages down to debug | ||
| // so that users are not innundated with info messages from the runtime. | ||
| // so that users are not inundated with info messages from the runtime. | ||
| vk::DebugUtilsMessageSeverityFlagsEXT::VERBOSE => log::Level::Trace, | ||
| vk::DebugUtilsMessageSeverityFlagsEXT::INFO => log::Level::Debug, | ||
| vk::DebugUtilsMessageSeverityFlagsEXT::WARNING => log::Level::Warn, | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names are killing me man, good riddance