1 /* 2 * Copyright 2020 Google LLC 3 * SPDX-License-Identifier: MIT 4 */ 5 6 #ifndef VKR_PHYSICAL_DEVICE_H 7 #define VKR_PHYSICAL_DEVICE_H 8 9 #include "vkr_common.h" 10 11 #include "venus-protocol/vn_protocol_renderer_util.h" 12 13 struct gbm_device; 14 15 struct vkr_physical_device { 16 struct vkr_object base; 17 18 struct vn_physical_device_proc_table proc_table; 19 20 VkPhysicalDeviceProperties properties; 21 uint32_t api_version; 22 23 VkExtensionProperties *extensions; 24 uint32_t extension_count; 25 26 bool KHR_external_memory_fd; 27 bool EXT_external_memory_dma_buf; 28 29 bool KHR_external_fence_fd; 30 bool KHR_external_semaphore_fd; 31 32 VkPhysicalDeviceMemoryProperties memory_properties; 33 VkPhysicalDeviceIDProperties id_properties; 34 bool is_dma_buf_fd_export_supported; 35 bool is_opaque_fd_export_supported; 36 struct gbm_device *gbm_device; 37 38 struct list_head devices; 39 }; 40 VKR_DEFINE_OBJECT_CAST(physical_device, VK_OBJECT_TYPE_PHYSICAL_DEVICE, VkPhysicalDevice) 41 42 void 43 vkr_context_init_physical_device_dispatch(struct vkr_context *ctx); 44 45 void 46 vkr_physical_device_destroy(struct vkr_context *ctx, 47 struct vkr_physical_device *physical_dev); 48 49 #endif /* VKR_PHYSICAL_DEVICE_H */ 50