Vk.GetPhysicalDeviceProperties2 Error
See original GitHub issueWhen trying to call the following method:
PhysicalDeviceProperties2 dProperties;
Vk.GetPhysicalDeviceProperties2(*devices, &dProperties);
I get the following error:
vkGetPhysicalDeviceProperties2: parameter pProperties->sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2. The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkPhysicalDeviceProperties2-sType-sType)
I have tried manually setting sType to the stated value, in the dProperties
variable above, but I then get a silent crash with no validation error or C# exception.
From what I can tell so far, it may be due to it getting the parameterless struct constructor mixed up with
public unsafe PhysicalDeviceProperties2(StructureType? sType = StructureType.PhysicalDeviceProperties2Khr, void* pNext = null, PhysicalDeviceProperties? properties = null)
If it defaults to using the parameterless constructor, the sType will not be correctly set.
EDIT: I’m using Silk.NET 2.16
Any other advice/ideas on this?
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Have you set the correct version when creating your instance?
If this is not the issue, then you will need to find a way to get the stack trace so we can discern the problem. Usually this is either using Visual Studio with native debugging enabled, or WinDbg (very difficult)
Awesome, glad that’s working now.