chromium/third_party/vulkan-validation-layers/src/layers/vulkan/generated/vk_object_types.h

// *** THIS FILE IS GENERATED - DO NOT EDIT ***
// See object_types_generator.py for modifications

/***************************************************************************
 *
 * Copyright (c) 2015-2024 The Khronos Group Inc.
 * Copyright (c) 2015-2024 Valve Corporation
 * Copyright (c) 2015-2024 LunarG, Inc.
 * Copyright (c) 2015-2024 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ****************************************************************************/

// NOLINTBEGIN

#pragma once
#include "utils/cast_utils.h"

// Object Type enum for validation layer internal object handling
VulkanObjectType;

VkDebugReportObjectTypeEXT GetDebugReport(VulkanObjectType type);
const char* string_VulkanObjectType(VulkanObjectType type);

// Helper function to get Official Vulkan VkObjectType enum from the internal layers version
static constexpr VkObjectType ConvertVulkanObjectToCoreObject(VulkanObjectType internal_type) {}

// Helper function to get internal layers object ids from the official Vulkan VkObjectType enum
static constexpr VulkanObjectType ConvertCoreObjectToVulkanObject(VkObjectType vulkan_object_type) {}
static constexpr VkDebugReportObjectTypeEXT ConvertCoreObjectToDebugReportObject(VkObjectType core_report_obj) {}

static constexpr VulkanObjectType ConvertDebugReportObjectToVulkanObject(VkDebugReportObjectTypeEXT debug_obj) {}

// Helper function to get Instance object types
static constexpr bool IsInstanceVkObjectType(VkObjectType type) {}

// Traits objects from each type statically map from Vk<handleType> to the various enums
template <typename VkType>
struct VkHandleInfo {};
template <VulkanObjectType id>
struct VulkanObjectTypeInfo {};

// The following line must match the vulkan_core.h condition guarding VK_DEFINE_NON_DISPATCHABLE_HANDLE
#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  //  VK_DEFINE_HANDLE logic duplication

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  // VK_USE_PLATFORM_FUCHSIA

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  // TYPESAFE_NONDISPATCHABLE_HANDLES

struct VulkanTypedHandle {};

// NOLINTEND