-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong/missing SType for some structures #60
Comments
The unmanaged memory used to marshal structs is not zeroed for fields that will always have a value, such as SType, so the unexpected type is likely garbage data from previous calls. I'll have a dig into the generator to see why these structs are not getting SType set correctly. |
Thank you for looking into this in advance and also thank you for all your great work here! |
Debugging a bit it seems that for DescriptorSetLayoutBindingFlagsCreateInfo the EnumElementReader only finds the old SType VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT, but not the new VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO. |
Thanks for spotting that - I hadn't noticed the extension enums being moved into feature release elements in the XML, so the generator was simply skipping the SType fields that referenced them. I'll push some NuGet packages tonight. |
I will test it as soon as you pushed the Nuget packages. Thank you! |
Just testet the new Nuget package. Lots of sTypes are fixed, thank you! However, there are still some sType related bugs. When calling physicalDevice.GetFeatures2() the debug layer throws:
It seems that when calling GetFeatures2() MarshalTo() is not called for the structure before calling vkGetPhysicalDeviceProperties2KHR and therefor sType is not initialized. The same problem occours for GetProperties2() and GetMemoryProperties2() |
That's going to take a little more fiddling :-D I'd not tackled extensions in return values, because there's no clean way to include "optional" return values without creating lots of references and memory churn. Until I've added those the GetFeatures2(), et cetera don't give you anything over regular GetFeatures() |
No problem. Currently I am only using extensions features supported by all the GPUs we are using. Just wanted to let you know that there are still some sTypes missing. Thanks for fixing the other structures again! |
The validation layers throw lots of VKStructureType warnings at me when using different structs.
Here is an example:
The unexpected type differs between calls and usually does not make any sense.
Looking at the code generate by SharpVk my guess is that for some structures SType is not set at all, but I am not sure if I am just missing the line where it's set.
One example is DescriptorSetLayoutBindingFlagsCreateInfo. While other MarshalTo methods set SType correctly, here SType is not set at all.
The text was updated successfully, but these errors were encountered: