#pragma once
#include "utils/cast_utils.h"
VulkanObjectType;
VkDebugReportObjectTypeEXT GetDebugReport(VulkanObjectType type);
const char* string_VulkanObjectType(VulkanObjectType type);
static constexpr VkObjectType ConvertVulkanObjectToCoreObject(VulkanObjectType internal_type) { … }
static constexpr VulkanObjectType ConvertCoreObjectToVulkanObject(VkObjectType vulkan_object_type) { … }
static constexpr VkDebugReportObjectTypeEXT ConvertCoreObjectToDebugReportObject(VkObjectType core_report_obj) { … }
static constexpr VulkanObjectType ConvertDebugReportObjectToVulkanObject(VkDebugReportObjectTypeEXT debug_obj) { … }
static constexpr bool IsInstanceVkObjectType(VkObjectType type) { … }
template <typename VkType>
struct VkHandleInfo { … };
template <VulkanObjectType id>
struct VulkanObjectTypeInfo { … };
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || \
defined(_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define TYPESAFE_NONDISPATCHABLE_HANDLES
#else
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkNonDispatchableHandle)
template <>
struct VkHandleInfo<VkNonDispatchableHandle> {
static const VulkanObjectType kVulkanObjectType = kVulkanObjectTypeUnknown;
static const VkDebugReportObjectTypeEXT kDebugReportObjectType = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT;
static const VkObjectType kVkObjectType = VK_OBJECT_TYPE_UNKNOWN;
static const char* Typename() { return "VkNonDispatchableHandle"; }
};
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeUnknown> {
typedef VkNonDispatchableHandle Type;
};
#endif
template <>
struct VkHandleInfo<VkInstance> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeInstance> { … };
template <>
struct VkHandleInfo<VkPhysicalDevice> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypePhysicalDevice> { … };
template <>
struct VkHandleInfo<VkDevice> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDevice> { … };
template <>
struct VkHandleInfo<VkQueue> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeQueue> { … };
template <>
struct VkHandleInfo<VkCommandBuffer> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeCommandBuffer> { … };
#ifdef TYPESAFE_NONDISPATCHABLE_HANDLES
template <>
struct VkHandleInfo<VkBuffer> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeBuffer> { … };
template <>
struct VkHandleInfo<VkImage> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeImage> { … };
template <>
struct VkHandleInfo<VkSemaphore> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeSemaphore> { … };
template <>
struct VkHandleInfo<VkFence> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeFence> { … };
template <>
struct VkHandleInfo<VkDeviceMemory> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDeviceMemory> { … };
template <>
struct VkHandleInfo<VkEvent> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeEvent> { … };
template <>
struct VkHandleInfo<VkQueryPool> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeQueryPool> { … };
template <>
struct VkHandleInfo<VkBufferView> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeBufferView> { … };
template <>
struct VkHandleInfo<VkImageView> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeImageView> { … };
template <>
struct VkHandleInfo<VkShaderModule> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeShaderModule> { … };
template <>
struct VkHandleInfo<VkPipelineCache> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypePipelineCache> { … };
template <>
struct VkHandleInfo<VkPipelineLayout> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypePipelineLayout> { … };
template <>
struct VkHandleInfo<VkPipeline> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypePipeline> { … };
template <>
struct VkHandleInfo<VkRenderPass> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeRenderPass> { … };
template <>
struct VkHandleInfo<VkDescriptorSetLayout> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDescriptorSetLayout> { … };
template <>
struct VkHandleInfo<VkSampler> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeSampler> { … };
template <>
struct VkHandleInfo<VkDescriptorSet> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDescriptorSet> { … };
template <>
struct VkHandleInfo<VkDescriptorPool> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDescriptorPool> { … };
template <>
struct VkHandleInfo<VkFramebuffer> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeFramebuffer> { … };
template <>
struct VkHandleInfo<VkCommandPool> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeCommandPool> { … };
template <>
struct VkHandleInfo<VkSamplerYcbcrConversion> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeSamplerYcbcrConversion> { … };
template <>
struct VkHandleInfo<VkDescriptorUpdateTemplate> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDescriptorUpdateTemplate> { … };
template <>
struct VkHandleInfo<VkPrivateDataSlot> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypePrivateDataSlot> { … };
template <>
struct VkHandleInfo<VkSurfaceKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeSurfaceKHR> { … };
template <>
struct VkHandleInfo<VkSwapchainKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeSwapchainKHR> { … };
template <>
struct VkHandleInfo<VkDisplayKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDisplayKHR> { … };
template <>
struct VkHandleInfo<VkDisplayModeKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDisplayModeKHR> { … };
template <>
struct VkHandleInfo<VkVideoSessionKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeVideoSessionKHR> { … };
template <>
struct VkHandleInfo<VkVideoSessionParametersKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeVideoSessionParametersKHR> { … };
template <>
struct VkHandleInfo<VkDeferredOperationKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDeferredOperationKHR> { … };
template <>
struct VkHandleInfo<VkPipelineBinaryKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypePipelineBinaryKHR> { … };
template <>
struct VkHandleInfo<VkDebugReportCallbackEXT> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDebugReportCallbackEXT> { … };
template <>
struct VkHandleInfo<VkCuModuleNVX> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeCuModuleNVX> { … };
template <>
struct VkHandleInfo<VkCuFunctionNVX> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeCuFunctionNVX> { … };
template <>
struct VkHandleInfo<VkDebugUtilsMessengerEXT> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeDebugUtilsMessengerEXT> { … };
template <>
struct VkHandleInfo<VkValidationCacheEXT> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeValidationCacheEXT> { … };
template <>
struct VkHandleInfo<VkAccelerationStructureNV> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeAccelerationStructureNV> { … };
template <>
struct VkHandleInfo<VkPerformanceConfigurationINTEL> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypePerformanceConfigurationINTEL> { … };
template <>
struct VkHandleInfo<VkIndirectCommandsLayoutNV> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeIndirectCommandsLayoutNV> { … };
template <>
struct VkHandleInfo<VkCudaModuleNV> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeCudaModuleNV> { … };
template <>
struct VkHandleInfo<VkCudaFunctionNV> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeCudaFunctionNV> { … };
template <>
struct VkHandleInfo<VkAccelerationStructureKHR> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeAccelerationStructureKHR> { … };
#ifdef VK_USE_PLATFORM_FUCHSIA
template <>
struct VkHandleInfo<VkBufferCollectionFUCHSIA> {
static const VulkanObjectType kVulkanObjectType = kVulkanObjectTypeBufferCollectionFUCHSIA;
static const VkDebugReportObjectTypeEXT kDebugReportObjectType = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT;
static const VkObjectType kVkObjectType = VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA;
static const char* Typename() { return "VkBufferCollectionFUCHSIA"; }
};
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeBufferCollectionFUCHSIA> {
typedef VkBufferCollectionFUCHSIA Type;
};
#endif
template <>
struct VkHandleInfo<VkMicromapEXT> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeMicromapEXT> { … };
template <>
struct VkHandleInfo<VkOpticalFlowSessionNV> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeOpticalFlowSessionNV> { … };
template <>
struct VkHandleInfo<VkShaderEXT> { … };
template <>
struct VulkanObjectTypeInfo<kVulkanObjectTypeShaderEXT> { … };
#endif
struct VulkanTypedHandle { … };