Skip to content

Commit

Permalink
explicitly set Vulkan debug message types instead of !empty() (#2321)
Browse files Browse the repository at this point in the history
Fixes:
  The Vulkan spec states: messageType must be a valid combination of VkDebugUtilsMessageTypeFlagBitsEXT values

Full message:
VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter(ERROR / SPEC): msgNum: -553000032 - Validation Error: [ VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xdf09e3a0 | vkCreateDebugUtilsMessengerEXT: value of pCreateInfo->messageType contains flag bits that are not recognized members of VkDebugUtilsMessageTypeFlagBitsEXT The Vulkan spec states: messageType must be a valid combination of VkDebugUtilsMessageTypeFlagBitsEXT values (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter)
    Objects: 1
        [0] 0, type: 3, name: NULL
  • Loading branch information
victorvde authored and kvark committed Dec 29, 2021
1 parent 232c9cc commit afb3782
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wgpu-hal/src/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ impl super::Instance {
let vk_info = vk::DebugUtilsMessengerCreateInfoEXT::builder()
.flags(vk::DebugUtilsMessengerCreateFlagsEXT::empty())
.message_severity(severity)
.message_type(vk::DebugUtilsMessageTypeFlagsEXT::all())
.message_type(
vk::DebugUtilsMessageTypeFlagsEXT::GENERAL
| vk::DebugUtilsMessageTypeFlagsEXT::VALIDATION
| vk::DebugUtilsMessageTypeFlagsEXT::PERFORMANCE,
)
.pfn_user_callback(Some(debug_utils_messenger_callback));
let messenger = extension
.create_debug_utils_messenger(&vk_info, None)
Expand Down

0 comments on commit afb3782

Please sign in to comment.