65 void initialize(
bool enable_validation =
false);
82 return has_atomic_float;
107 return physical_device;
121 return compute_queue;
128 return compute_queue_family;
142 return device_properties;
165 VkInstance instance = VK_NULL_HANDLE;
166 VkPhysicalDevice physical_device = VK_NULL_HANDLE;
167 VkDevice device = VK_NULL_HANDLE;
168 VkQueue compute_queue = VK_NULL_HANDLE;
169 uint32_t compute_queue_family = 0;
172 VmaAllocator allocator = VK_NULL_HANDLE;
175 VkPhysicalDeviceProperties device_properties{};
176 bool has_atomic_float =
false;
177 bool is_moltenvk =
false;
180 VkDebugUtilsMessengerEXT debug_messenger = VK_NULL_HANDLE;
185 void createInstance(
bool enable_validation);
190 void selectPhysicalDevice();
195 void createLogicalDevice();
200 void createAllocator();
205 void setupDebugMessenger();
212 uint32_t findComputeQueueFamily(VkPhysicalDevice device_candidate)
const;
219 uint32_t scorePhysicalDevice(VkPhysicalDevice device_candidate)
const;
224 bool isDeviceSuitable(VkPhysicalDevice device_candidate)
const;
229 void detectMoltenVK();
234 void detectAtomicFloat();