Wyatt Kennedy
07/20/2023, 2:12 AMvkGetInstanceProcAddr
which fetches a ptr to a function. cinterop maps this to CPointer<() -> Unit>
by default but I need to cast this to a different function typealias. The typealias is PFN_vkCreateDebugUtilMessengerEXT
. To cast this and call it I run _vkGetInstanceProcAddr_(instance.ptr, "vkCreateDebugUtilsMessengerEXT")!!.reinterpret<PFN_vkCreateDebugUtilMessengerEXTVar>().pointed.value!!
this returns successfully. When I attempt to invoke it, no exception is thrown, nothing is written to stdout, it simply exits the runtime right there with no other notifications. Am I performing this cast correctly, and if so, can you think of something I can do to debug this behavior?Wyatt Kennedy
07/20/2023, 6:00 AMCFunction<>
type. PFN_vkCreateDebugUtilMessengerEXT
was of type CPointer<CFunction< ... >>
so I reinterpreted the original pointer with the type in there and it works fine. Rather than looking up the correct signature to put there, it'd be nice if cinterop provided a typealias for just the CFunction part of the function pointer. I'll put in a youtrack for it.