mono / VulkanSharp

Open source .NET binding for the Vulkan API
MIT License
537 stars 61 forks source link

lots of pointers not fixed when passed to native functions #61

Open JoernSpannhacke opened 7 years ago

JoernSpannhacke commented 7 years ago

For example pBeginInfo passes vkBeginCommandBuffer without fixing. If GC is running and moving the memory during this call, the program crashes. This happens very often as soon as a second thread is running and allocating memory. Sadly, this makes the VulkanSharp Bindings unusable for multi threaded code.

TillAlex commented 5 years ago

As far as I understand this is not a problem. Looking at the code it seems that all Vulkan structures are allocated from unmanaged memory and therefore will not be moved during garbage collection. @radekdoulik: Can you comment on this?