|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Owns the dynamically opened Vulkan loader library and the VulkanApi resolved from it. More...
#include "donner/gpu/vulkan/VulkanLoader.h"
Public Member Functions | |
| ~VulkanLoader () | |
| Closes the loader library. | |
| VulkanLoader (const VulkanLoader &)=delete | |
| VulkanLoader & | operator= (const VulkanLoader &)=delete |
| VulkanLoader (VulkanLoader &&)=delete | |
| VulkanLoader & | operator= (VulkanLoader &&)=delete |
| const VulkanApi & | api () const |
| The resolved entry points. Members become non-null as each tier is loaded. | |
| Status | loadInstance (VkInstance instance, bool debugUtilsEnabled) |
Resolves the instance-level entry points against instance. | |
| Status | loadDevice (VkDevice device) |
Resolves the device-level entry points against device, bypassing the loader's instance-level dispatch for everything recorded per draw. | |
Static Public Member Functions | |
| static Result< std::shared_ptr< VulkanLoader > > | Open () |
| Opens the platform's Vulkan loader and resolves the global entry points. | |
Owns the dynamically opened Vulkan loader library and the VulkanApi resolved from it.
The library stays open for as long as this object lives, which must outlive every Vulkan object created through it: closing the loader invalidates the code behind every resolved entry point. Devices therefore hold this by shared pointer.
All three loading steps fail closed with a GpuError naming exactly what was missing, so an embedder on a machine with no Vulkan installed gets a clean unsupported result rather than a crash.
| Status donner::gpu::vulkan::VulkanLoader::loadDevice | ( | VkDevice | device | ) |
Resolves the device-level entry points against device, bypassing the loader's instance-level dispatch for everything recorded per draw.
| device | Device the entry points are resolved for. |
| Status donner::gpu::vulkan::VulkanLoader::loadInstance | ( | VkInstance | instance, |
| bool | debugUtilsEnabled ) |
Resolves the instance-level entry points against instance.
| instance | Instance the entry points are resolved for. |
| debugUtilsEnabled | True when the debug-utils extension was enabled on instance, in which case its two entry points are resolved as well; they stay null otherwise. |
|
static |
Opens the platform's Vulkan loader and resolves the global entry points.
The loader is opened by its stable versioned name first, since that is the name a deployed runtime is guaranteed to provide; the unversioned development symlink is a fallback for environments that ship only it.