// ============================================= // Aster: device.h // Copyright (c) 2020-2024 Anish Bhobe // ============================================= #pragma once #include "global.h" #include "physical_device.h" constexpr std::string DEFAULT_DEVICE_NAME = ""; struct QueueAllocation { u32 family; u32 count; }; struct Device final { vk::Device device; PhysicalDevice physical_device; VmaAllocator allocator{ nullptr }; std::optional name{ nullptr }; Device(const Context *_context, PhysicalDevice &&_physical_device, const vk::PhysicalDeviceFeatures *_enabled_features, const std::vector &_queue_allocation, std::optional _name = std::nullopt); ~Device(); };