Open hja3 opened 1 month ago
I imagine that the C++ example is not using this specific function? It sounds like the generator will have to account for missing symbols in extension.
Yes, that's right. The extension is really only used minimally in the C++ example. A custom debug messenger is created with a debug callback that prepends the string "validation layer: " to messages from the validation layer.
The Olivine equivalent I am trying to run looks like this:
(* ... example.ml continued ... *)
module Debug_messenger = struct
let debug_callback _ _ cb_data_ptr _ =
let cb_data = Ctypes.(!@cb_data_ptr) in
let msg = Vkt.Debug_utils_messenger_callback_data_ext.message cb_data in
Printf.eprintf "validation layer: %s\n" msg;
false
;;
let create_info =
let severity_flags =
Vkt.Debug_utils_message_severity_flags_ext.(verbose + warning + error)
and type_flags =
Vkt.Debug_utils_message_type_flags_ext.(general + validation + performance)
in
Vkt.Debug_utils_messenger_create_info_ext.make
~message_severity:severity_flags
~message_type:type_flags
~pfn_user_callback:debug_callback
()
;;
let messenger =
Debug_utils.create_debug_utils_messenger_ext ~instance:Instance.x ~create_info ()
<?> "debug messenger"
;;
end
I think I may have encountered a bug while trying to use the debug utils extension in Olivine. The following code triggers an exception
the output is
Initially, I suspected that the Nix environment might be at fault, but the C++ example from Vulkan Tutorial is able to use the debug utils extension in a similar environment.
Indeed, it appears that there is no such symbol 'vkCmdBeginDebugUtilsLabelEXT' in the library. The nearest I can find is one without the 'vk' prefix: