I was gonna ask this on matrix but the link doesn't work anymore, the cert on the website seems dead.
My Vulkan understanding is rather basic, I'm using this guide https://renderdoc.org/vulkan-layer-guide.html
I've been trying to understand the API and to create the export shims to call a more high level polymorphic implementation that I want to write.
For clarity sake, I'm using qualified imports.
I want to implement createInstance, for this I'm trying to write a shim to convert to the high level API.
foreign export ccall "Kairos_createInstance" c_createInstance
:: Ptr (Vk.SomeStruct Vk.InstanceCreateInfo)
-> Ptr (Vk.AllocationCallbacks)
-> Ptr (Ptr Vk.Instance_T)
-> IO Vk.Result
This seems to work, but I'm unsure how to correctly convert Ptr (Vk.SomeStruct a) to the type (Vk.Extendss b es) => (a b es), I think I want to use peekSomeCStruct , but the return type is still just SomeStruct?
I'm struggling to piece all the parts together, I don't feel very confident with my understanding of the higher level polymorphic types, and grepping the source code I can't find many examples of my use case.
Any help would be much appreciated.
Also as an aside, I have a hunch due to the nature of vulkan layers, I need to recompile this library with safe calls?
I was gonna ask this on matrix but the link doesn't work anymore, the cert on the website seems dead.
My Vulkan understanding is rather basic, I'm using this guide https://renderdoc.org/vulkan-layer-guide.html
I've been trying to understand the API and to create the export shims to call a more high level polymorphic implementation that I want to write.
For clarity sake, I'm using qualified imports.
I want to implement
createInstance, for this I'm trying to write a shim to convert to the high level API.This seems to work, but I'm unsure how to correctly convert
Ptr (Vk.SomeStruct a)to the type(Vk.Extendss b es) => (a b es), I think I want to usepeekSomeCStruct, but the return type is still justSomeStruct?I'm struggling to piece all the parts together, I don't feel very confident with my understanding of the higher level polymorphic types, and grepping the source code I can't find many examples of my use case.
Any help would be much appreciated.
Also as an aside, I have a hunch due to the nature of vulkan layers, I need to recompile this library with safe calls?