Closed TechLiam closed 4 years ago
Could you please point the faulting line, this code works as expected on my linux, is it the first call to vkEnumerateInstanceLayerProperties?
For your remark concerning the casting (IntPtr) instead of (uint) you may be right, there's maybe a useless extra conversion but uint to/from IntPtr is implicit, it should not cause exception (I don't think that's the source of your error). I'll put this check on my todo list for next version.
Ah sorry about the specifics missing yes it is the first call to vkEnumerateInstanceLayerProperties that gives the exception.
I think the course of it might be that pProperties is been put into num which is an IntPtr then changed into a uint* (yes this is a pointer but only to a uint space) so when it trying to write something to the pProperties address it's going out of bounds maybe I'm probably wrong about that.
More information on my system: Window 10 .Net Core Console app
When would a next release be likely to happen no rush just interested in how active you were on the development of this :) I'm only playing around with Vulkan for fun so no rush from me
The problem is that the function pointer for vkEnumerateInstanceLayerProperties is loaded after device or instance creation. There are some preloaded functions by the static ctor of 'Vk' but 'vkEnumerateInstanceLayerProperties' was not preloaded (https://github.com/jpbruyere/vk.net/blob/master/vk.generator/Program.cs#L181), so I've just had it in a '0.2.2-beta' release that should be available on nuget now or in a few minuts.
Thanks, @jpbruyere that has solved my issue grate work. I would be happy to help out this project in some way if you would like me to do anything else I will report any other issues I come up against while I play around with Vulkan using your wrapper
Thank you, I mostly program on linux, so I'm happy to have some return from windows users. If you want to help, feel free to make propositions and push requests, it is also always welcome to improve documentation or make tutorials (even small ones, install steps,...), each comments or remarks will be welcome.
So I will start by saying I'm not sure what I'm about to say is right but please stick with me.
This is the code I'm using to call the vkEnumerateInstanceLayerProperties
This is effectivally your code from VKE for vkEnumerateInstanceExtensionProperties but for Layers.
Looking at the generated code
To my unaware of how such things work but learning mind this looks like things are the wrong cast in that
should be
But I'm happy to accept if I'm wrong please let me know