1 /* 2 * Copyright 2020 Google LLC 3 * SPDX-License-Identifier: MIT 4 */ 5 6 #ifndef VKR_INSTANCE_H 7 #define VKR_INSTANCE_H 8 9 #include "vkr_common.h" 10 11 struct vkr_instance { 12 struct vkr_object base; 13 14 uint32_t api_version; 15 PFN_vkCreateDebugUtilsMessengerEXT create_debug_utils_messenger; 16 PFN_vkDestroyDebugUtilsMessengerEXT destroy_debug_utils_messenger; 17 VkDebugUtilsMessengerEXT validation_messenger; 18 19 uint32_t physical_device_count; 20 VkPhysicalDevice *physical_device_handles; 21 struct vkr_physical_device **physical_devices; 22 }; 23 VKR_DEFINE_OBJECT_CAST(instance, VK_OBJECT_TYPE_INSTANCE, VkInstance) 24 25 void 26 vkr_context_init_instance_dispatch(struct vkr_context *ctx); 27 28 void 29 vkr_instance_destroy(struct vkr_context *ctx, struct vkr_instance *instance); 30 31 #endif /* VKR_INSTANCE_H */ 32