Add logging to get_proc_addrs

This commit is contained in:
hodasemi 2023-02-22 09:24:28 +01:00
parent 7cc1eb54e2
commit eaff64a9d6

View file

@ -55,6 +55,8 @@ extern "system" fn get_device_proc_addr(
_device: VkDevice,
function_name: *const c_char,
) -> PFN_vkVoidFunction {
write_log!("get_device_proc_addr");
let func_string = match VkString::try_from(function_name) {
Ok(func) => func,
Err(_) => {
@ -65,6 +67,8 @@ extern "system" fn get_device_proc_addr(
let s = func_string.as_str();
write_log!(format!("\t{}", s));
if let Some(func) = Functions::get_vk_func(s) {
return func.convert();
}
@ -73,6 +77,8 @@ extern "system" fn get_device_proc_addr(
return func;
}
write_log!("\t-> returning null");
Functions::Null.convert()
}
@ -81,6 +87,8 @@ extern "system" fn get_instance_proc_addr(
_instance: VkInstance,
function_name: *const c_char,
) -> PFN_vkVoidFunction {
write_log!("get_instance_proc_addr");
let func_string = match VkString::try_from(function_name) {
Ok(func) => func,
Err(_) => {
@ -91,6 +99,8 @@ extern "system" fn get_instance_proc_addr(
let s = func_string.as_str();
write_log!(format!("\t{}", s));
if let Some(func) = Functions::get_vk_func(s) {
return func.convert();
}
@ -99,6 +109,8 @@ extern "system" fn get_instance_proc_addr(
return func;
}
write_log!("\t-> returning null");
Functions::Null.convert()
}