Break it up into vkr_{device,instance,physical_device}.h. Suggested by Ryan Neph. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com>macos/master
parent
dce3ea0701
commit
9489ba1174
@ -0,0 +1,33 @@ |
||||
/*
|
||||
* Copyright 2020 Google LLC |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#ifndef VKR_INSTANCE_H |
||||
#define VKR_INSTANCE_H |
||||
|
||||
#include "vkr_common.h" |
||||
|
||||
struct vkr_instance { |
||||
struct vkr_object base; |
||||
|
||||
uint32_t api_version; |
||||
PFN_vkCreateDebugUtilsMessengerEXT create_debug_utils_messenger; |
||||
PFN_vkDestroyDebugUtilsMessengerEXT destroy_debug_utils_messenger; |
||||
PFN_vkGetMemoryFdKHR get_memory_fd; |
||||
PFN_vkGetFenceFdKHR get_fence_fd; |
||||
|
||||
VkDebugUtilsMessengerEXT validation_messenger; |
||||
|
||||
uint32_t physical_device_count; |
||||
VkPhysicalDevice *physical_device_handles; |
||||
struct vkr_physical_device **physical_devices; |
||||
}; |
||||
|
||||
void |
||||
vkr_context_init_instance_dispatch(struct vkr_context *ctx); |
||||
|
||||
void |
||||
vkr_instance_destroy(struct vkr_context *ctx, struct vkr_instance *instance); |
||||
|
||||
#endif /* VKR_INSTANCE_H */ |
@ -0,0 +1,33 @@ |
||||
/*
|
||||
* Copyright 2020 Google LLC |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#ifndef VKR_PHYSICAL_DEVICE_H |
||||
#define VKR_PHYSICAL_DEVICE_H |
||||
|
||||
#include "vkr_common.h" |
||||
|
||||
struct vkr_physical_device { |
||||
struct vkr_object base; |
||||
|
||||
VkPhysicalDeviceProperties properties; |
||||
uint32_t api_version; |
||||
|
||||
VkExtensionProperties *extensions; |
||||
uint32_t extension_count; |
||||
|
||||
bool KHR_external_memory_fd; |
||||
bool EXT_external_memory_dma_buf; |
||||
|
||||
bool KHR_external_fence_fd; |
||||
|
||||
VkPhysicalDeviceMemoryProperties memory_properties; |
||||
|
||||
struct list_head devices; |
||||
}; |
||||
|
||||
void |
||||
vkr_context_init_physical_device_dispatch(struct vkr_context *ctx); |
||||
|
||||
#endif /* VKR_PHYSICAL_DEVICE_H */ |
Loading…
Reference in new issue