mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 21:25:46 +00:00
renderer_vulkan/wrapper: Add instance handle
This commit is contained in:
parent
8fa9aa08f7
commit
467a8c3285
2 changed files with 87 additions and 0 deletions
|
@ -542,4 +542,21 @@ using SurfaceKHR = Handle<VkSurfaceKHR, VkInstance, InstanceDispatch>;
|
|||
using DescriptorSets = PoolAllocations<VkDescriptorSet, VkDescriptorPool>;
|
||||
using CommandBuffers = PoolAllocations<VkCommandBuffer, VkCommandPool>;
|
||||
|
||||
/// Vulkan instance owning handle.
|
||||
class Instance : public Handle<VkInstance, NoOwner, InstanceDispatch> {
|
||||
using Handle<VkInstance, NoOwner, InstanceDispatch>::Handle;
|
||||
|
||||
public:
|
||||
/// Creates a Vulkan instance. Use "operator bool" for error handling.
|
||||
static Instance Create(Span<const char*> layers, Span<const char*> extensions,
|
||||
InstanceDispatch& dld) noexcept;
|
||||
|
||||
/// Enumerates physical devices.
|
||||
/// @return Physical devices and an empty handle on failure.
|
||||
std::optional<std::vector<VkPhysicalDevice>> EnumeratePhysicalDevices();
|
||||
|
||||
/// Tries to create a debug callback messenger. Returns an empty handle on failure.
|
||||
DebugCallback TryCreateDebugCallback(PFN_vkDebugUtilsMessengerCallbackEXT callback) noexcept;
|
||||
};
|
||||
|
||||
} // namespace Vulkan::vk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue