mono / VulkanSharp

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

Commands.EnumerateInstanceLayerProperties returns invalid LayerProperties #47

Closed TillAlex closed 8 years ago

TillAlex commented 8 years ago

LayerProperties returned by Commands.EnumerateInstanceLayerProperties have empty Description and LayerName and throw AccessViolationExceptions for ImplementationVersion and SpecVersion.

radekdoulik commented 8 years ago

I have tried to replicate it, my Android device doesn't report any layer properties though :( So the result was null.

Tried to enumerate the extensions and that works OK here.

Maybe I should try it on Windows machine, where it might report the layer properties.

What system do you use?

TillAlex commented 8 years ago

I'm working on Windows 10 64bit with the validation layers from the LunarG SDK. Thanks for your efforts in advance!

Am 04.10.2016 3:31 nachm. schrieb "Radek Doulik" notifications@github.com:

I have tried to replicate it, my Android device doesn't report any layer properties though :( So the result was null.

Tried to enumerate the extensions and that works OK here.

Maybe I should try it on Windows machine, where it might report the layer properties.

What system do you use?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mono/VulkanSharp/issues/47#issuecomment-251388268, or mute the thread https://github.com/notifications/unsubscribe-auth/AFS0Qv7DzBVJ6KsWsZgtH0ilYsXUkhvCks5qwlVNgaJpZM4KI8p6 .

TillAlex commented 8 years ago

I won't be in the office until Monday, so I can't testright now: Does the new Windows inspector work together with the LunarG SDK on your system?

radekdoulik commented 8 years ago

I was able to replicate the issue. Hope to fix it soon. The windows inspector might not work, I think I pushed different version than I wanted. Will look at it.

TillAlex commented 8 years ago

I know that enumerating layer properties worked in the past. Perhaps this issue is connected to recent changes in unmanaged memory management?

amerkoleci commented 8 years ago

The issue is related to "refpProperties.Release ();", basically this triggers the GC to release the returned values, should find better way, commenting the line always works.

radekdoulik commented 8 years ago

Yes, it was related to native memory management. I reworked that part so that we don't clash with GC.

I am unable to reproduce the issue on Windows anymore, so hopefully it will be fixed for you as well.