public sealed class VulkanInstanceThe Vulkan instance, its layers, and the messenger that routes what they say.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
This was written against the specification and the Silk.NET bindings on a machine with no Vulkan loader, at the user's direction and with that stated, and has since met a real driver (MoltenVK on macOS, with the Khronos validation layer). The Vulkan calls turned out to be right; what was wrong was the layer underneath them — finding the loader, and then who owns it — which is what VulkanLoader and the ownership note in Dispose are about.
The portability handling is the part most likely to be wrong and most likely to be blamed on something else. On macOS the Loader will not return MoltenVK's VkPhysicalDevice at all unless the instance is created with VK_KHR_portability_enumeration and the matching create flag — the symptom is "no Vulkan devices found" on a machine that works fine ([10](../../docs/plan/10-platforms.md) § macOS).
Fields and properties (5)
public Vk ApiThe loaded Vulkan API.
public Instance HandleThe instance handle.
public bool ValidationEnabledWhether the validation layers are on.
public bool PortabilityEnabledWhether the instance was created for a portability driver such as MoltenVK.
public uint ApiVersionThe Vulkan version the instance was created against, packed as Vulkan packs it.
Methods (4)
public static VulkanInstance Create()Creates an instance with the documented defaults, or explains why it could not.
public static VulkanInstance Create(VulkanInstanceOptions options)Creates an instance, or explains why it could not.
public static bool TryCreate(VulkanInstanceOptions options, out VulkanInstance? instance, out string? reason)Creates an instance, reporting failure rather than throwing.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (6)
- ValidationCleanTestsVixen.Graphics.Vulkan.Tests
- VulkanAdapterVixen.Graphics.Vulkan
- VulkanDeviceVixen.Graphics.Vulkan
- VulkanInstanceTestsVixen.Graphics.Vulkan.Tests
- VulkanSurfaceVixen.Graphics.Vulkan
- VulkanSwapChainVixen.Graphics.Vulkan