Validation layer is unable to output any errors. #511
-
👋 This is likely an error on my part somewhere but I've just noticed recently that I appear to be unable to get any validation errors in my console. I first noticed this when I was attempting to integrate dynamic uniform descriptors with an incorrect offset into my program(not intentionally) and my application basically appeared to freeze and become un-responsive. It wasn't until later when I attempted replicate a similar scenario in the texture example for Ash where I discovered that the incorrect offset was the likely culprit. In the texture sample that I modified(more or less adding a random value to the offsets slice during After trying out a couple other scenarios where I'm sure an error would have normally been logged in my application, no message ever appears to show up which makes me think I've been missing validation errors in general through my application. I could have swore validation was fully working as I was starting to build out my application and I'm pretty sure I've seen errors pop up so I'm struggling a little bit to understand what could have happened, especially considering that I pretty much just adapted the code in the examples into my application for initializing validation. I still get info messages for whatever reason. For reference, this is the validation initialization code I have. extern crate ash;
use ash::{vk};
use std::borrow::Cow;
use std::ffi::{CStr,CString};
use self::ash::{
Entry,
Instance
};
use self::ash::extensions::ext::DebugUtils;
use self::ash::vk::DebugUtilsMessengerEXT;
/// debug callback for system
unsafe extern "system" fn vulkan_debug_callback(
message_severity: vk::DebugUtilsMessageSeverityFlagsEXT,
message_type: vk::DebugUtilsMessageTypeFlagsEXT,
p_callback_data: *const vk::DebugUtilsMessengerCallbackDataEXT,
_user_data: *mut std::os::raw::c_void,
) -> vk::Bool32 {
let callback_data = *p_callback_data;
let message_id_number: i32 = callback_data.message_id_number as i32;
let message_id_name = if callback_data.p_message_id_name.is_null() {
Cow::from("")
} else {
CStr::from_ptr(callback_data.p_message_id_name).to_string_lossy()
};
let message = if callback_data.p_message.is_null() {
Cow::from("")
} else {
CStr::from_ptr(callback_data.p_message).to_string_lossy()
};
println!(
"{:?}: {:?} [{} ({})] : {}",
message_severity,
message_type,
message_id_name,
&message_id_number.to_string(),
message,
);
vk::FALSE
}
/// builds the debugger / validator
pub unsafe fn build_debug_info(entry:&Entry, instance:&Instance)->DebugUtilsMessengerEXT{
let debug_info = vk::DebugUtilsMessengerCreateInfoEXT::builder()
.message_severity(
vk::DebugUtilsMessageSeverityFlagsEXT::ERROR |
vk::DebugUtilsMessageSeverityFlagsEXT::WARNING |
vk::DebugUtilsMessageSeverityFlagsEXT::INFO
)
.message_type(vk::DebugUtilsMessageTypeFlagsEXT::all())
.pfn_user_callback(Some(vulkan_debug_callback));
let debug_utils_loader = DebugUtils::new(entry,instance);
debug_utils_loader.create_debug_utils_messenger(&debug_info, None).unwrap()
} Any ideas? Or is there another test I could try to see if I can trigger error messages? Any help would be appreciated! I am still a little new to Vulkan and Rust so I'm sure there's something I'm overlooking. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
GAGH - so it turns out I was dumb. I added the LunarG monitor layer at one point just to get a general FPS count and some how I failed to notice that I erased the Never mind; ugh. |
Beta Was this translation helpful? Give feedback.
GAGH - so it turns out I was dumb. I added the LunarG monitor layer at one point just to get a general FPS count and some how I failed to notice that I erased the
VK_LAYER_KHRONOS_validation
layer name during initialization.Never mind; ugh.