|
| 1 | + |
| 2 | +/* |
| 3 | + * Copyright (C) 2021-2023 Valve Corporation |
| 4 | + * Copyright (C) 2021-2023 LunarG, Inc. |
| 5 | + * |
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License") |
| 7 | + * you may not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + * |
| 18 | + * This file is ***GENERATED***. Do Not Edit. |
| 19 | + * See scripts/gen_profiles_solution.py for modifications. |
| 20 | + */ |
| 21 | + |
| 22 | +#ifndef VULKAN_PROFILES_H_ |
| 23 | +#define VULKAN_PROFILES_H_ 1 |
| 24 | + |
| 25 | +#define VPAPI_ATTR |
| 26 | + |
| 27 | +#ifdef __cplusplus |
| 28 | + extern "C" { |
| 29 | +#endif |
| 30 | + |
| 31 | +#include <vulkan/vulkan.h> |
| 32 | + |
| 33 | +#if defined(VK_VERSION_1_1) && \ |
| 34 | + defined(VK_ANDROID_external_memory_android_hardware_buffer) && \ |
| 35 | + defined(VK_EXT_queue_family_foreign) && \ |
| 36 | + defined(VK_EXT_swapchain_colorspace) && \ |
| 37 | + defined(VK_GOOGLE_display_timing) && \ |
| 38 | + defined(VK_KHR_android_surface) && \ |
| 39 | + defined(VK_KHR_create_renderpass2) && \ |
| 40 | + defined(VK_KHR_dedicated_allocation) && \ |
| 41 | + defined(VK_KHR_descriptor_update_template) && \ |
| 42 | + defined(VK_KHR_driver_properties) && \ |
| 43 | + defined(VK_KHR_external_fence) && \ |
| 44 | + defined(VK_KHR_external_fence_capabilities) && \ |
| 45 | + defined(VK_KHR_external_fence_fd) && \ |
| 46 | + defined(VK_KHR_external_memory) && \ |
| 47 | + defined(VK_KHR_external_memory_capabilities) && \ |
| 48 | + defined(VK_KHR_external_semaphore) && \ |
| 49 | + defined(VK_KHR_external_semaphore_capabilities) && \ |
| 50 | + defined(VK_KHR_external_semaphore_fd) && \ |
| 51 | + defined(VK_KHR_get_memory_requirements2) && \ |
| 52 | + defined(VK_KHR_get_physical_device_properties2) && \ |
| 53 | + defined(VK_KHR_get_surface_capabilities2) && \ |
| 54 | + defined(VK_KHR_incremental_present) && \ |
| 55 | + defined(VK_KHR_maintenance1) && \ |
| 56 | + defined(VK_KHR_sampler_mirror_clamp_to_edge) && \ |
| 57 | + defined(VK_KHR_storage_buffer_storage_class) && \ |
| 58 | + defined(VK_KHR_surface) && \ |
| 59 | + defined(VK_KHR_swapchain) && \ |
| 60 | + defined(VK_KHR_variable_pointers) |
| 61 | +#define VP_ANDROID_baseline_2022 1 |
| 62 | +#define VP_ANDROID_BASELINE_2022_NAME "VP_ANDROID_baseline_2022" |
| 63 | +#define VP_ANDROID_BASELINE_2022_SPEC_VERSION 1 |
| 64 | +#define VP_ANDROID_BASELINE_2022_MIN_API_VERSION VK_MAKE_VERSION(1, 1, 106) |
| 65 | +#endif |
| 66 | + |
| 67 | +#define VP_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 2, 0, VK_HEADER_VERSION) |
| 68 | + |
| 69 | +#define VP_MAX_PROFILE_NAME_SIZE 256U |
| 70 | + |
| 71 | +typedef struct VpProfileProperties { |
| 72 | + char profileName[VP_MAX_PROFILE_NAME_SIZE]; |
| 73 | + uint32_t specVersion; |
| 74 | +} VpProfileProperties; |
| 75 | + |
| 76 | +typedef struct VpBlockProperties { |
| 77 | + VpProfileProperties profiles; |
| 78 | + uint32_t apiVersion; |
| 79 | + char blockName[VP_MAX_PROFILE_NAME_SIZE]; |
| 80 | +} VpBlockProperties; |
| 81 | + |
| 82 | +typedef enum VpInstanceCreateFlagBits { |
| 83 | + VP_INSTANCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF |
| 84 | +} VpInstanceCreateFlagBits; |
| 85 | +typedef VkFlags VpInstanceCreateFlags; |
| 86 | + |
| 87 | +typedef struct VpInstanceCreateInfo { |
| 88 | + const VkInstanceCreateInfo* pCreateInfo; |
| 89 | + VpInstanceCreateFlags flags; |
| 90 | + uint32_t enabledFullProfileCount; |
| 91 | + const VpProfileProperties* pEnabledFullProfiles; |
| 92 | + uint32_t enabledProfileBlockCount; |
| 93 | + const VpBlockProperties* pEnabledProfileBlocks; |
| 94 | +} VpInstanceCreateInfo; |
| 95 | + |
| 96 | +typedef enum VpDeviceCreateFlagBits { |
| 97 | + VP_DEVICE_CREATE_DISABLE_ROBUST_BUFFER_ACCESS_BIT = 0x0000001, |
| 98 | + VP_DEVICE_CREATE_DISABLE_ROBUST_IMAGE_ACCESS_BIT = 0x0000002, |
| 99 | + VP_DEVICE_CREATE_DISABLE_ROBUST_ACCESS = |
| 100 | + VP_DEVICE_CREATE_DISABLE_ROBUST_BUFFER_ACCESS_BIT | VP_DEVICE_CREATE_DISABLE_ROBUST_IMAGE_ACCESS_BIT, |
| 101 | + |
| 102 | + VP_DEVICE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF |
| 103 | +} VpDeviceCreateFlagBits; |
| 104 | +typedef VkFlags VpDeviceCreateFlags; |
| 105 | + |
| 106 | +typedef struct VpDeviceCreateInfo { |
| 107 | + const VkDeviceCreateInfo* pCreateInfo; |
| 108 | + VpDeviceCreateFlags flags; |
| 109 | + uint32_t enabledFullProfileCount; |
| 110 | + const VpProfileProperties* pEnabledFullProfiles; |
| 111 | + uint32_t enabledProfileBlockCount; |
| 112 | + const VpBlockProperties* pEnabledProfileBlocks; |
| 113 | +} VpDeviceCreateInfo; |
| 114 | + |
| 115 | +// Query the list of available profiles in the library |
| 116 | +VPAPI_ATTR VkResult vpGetProfiles(uint32_t *pPropertyCount, VpProfileProperties *pProperties); |
| 117 | + |
| 118 | +// List the required profiles of a profile |
| 119 | +VPAPI_ATTR VkResult vpGetProfileRequiredProfiles(const VpProfileProperties* pProfile, uint32_t* pPropertyCount, VpProfileProperties* pProperties); |
| 120 | + |
| 121 | +// Query the profile required Vulkan API version |
| 122 | +VPAPI_ATTR uint32_t vpGetProfileAPIVersion(const VpProfileProperties* pProfile); |
| 123 | + |
| 124 | +// List the recommended fallback profiles of a profile |
| 125 | +VPAPI_ATTR VkResult vpGetProfileFallbacks(const VpProfileProperties *pProfile, uint32_t *pPropertyCount, VpProfileProperties *pProperties); |
| 126 | + |
| 127 | +// Query whether the profile has multiple variants. Profiles with multiple variants can only use vpGetInstanceProfileSupport and vpGetPhysicalDeviceProfileSupport capabilities of the library. Other function will return a VK_ERROR_UNKNOWN error |
| 128 | +VPAPI_ATTR VkResult vpHasMultipleVariantsProfile(const VpProfileProperties *pProfile, VkBool32 *pHasMultipleVariants); |
| 129 | + |
| 130 | +// Check whether a profile is supported at the instance level |
| 131 | +VPAPI_ATTR VkResult vpGetInstanceProfileSupport(const char *pLayerName, const VpProfileProperties *pProfile, VkBool32 *pSupported); |
| 132 | + |
| 133 | +// Check whether a variant of a profile is supported at the instance level and report this list of blocks used to validate the profiles |
| 134 | +VPAPI_ATTR VkResult vpGetInstanceProfileVariantsSupport(const char *pLayerName, const VpProfileProperties *pProfile, VkBool32 *pSupported, uint32_t *pPropertyCount, VpBlockProperties* pProperties); |
| 135 | + |
| 136 | +// Create a VkInstance with the profile instance extensions enabled |
| 137 | +VPAPI_ATTR VkResult vpCreateInstance(const VpInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance); |
| 138 | + |
| 139 | +// Check whether a profile is supported by the physical device |
| 140 | +VPAPI_ATTR VkResult vpGetPhysicalDeviceProfileSupport(VkInstance instance, VkPhysicalDevice physicalDevice, const VpProfileProperties *pProfile, VkBool32 *pSupported); |
| 141 | + |
| 142 | +// Check whether a variant of a profile is supported by the physical device and report this list of blocks used to validate the profiles |
| 143 | +VPAPI_ATTR VkResult vpGetPhysicalDeviceProfileVariantsSupport(VkInstance instance, VkPhysicalDevice physicalDevice, const VpProfileProperties *pProfile, VkBool32 *pSupported, uint32_t *pPropertyCount, VpBlockProperties* pProperties); |
| 144 | + |
| 145 | +// Create a VkDevice with the profile features and device extensions enabled |
| 146 | +VPAPI_ATTR VkResult vpCreateDevice(VkPhysicalDevice physicalDevice, const VpDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice); |
| 147 | + |
| 148 | +// Query the list of instance extensions of a profile |
| 149 | +VPAPI_ATTR VkResult vpGetProfileInstanceExtensionProperties(const VpProfileProperties *pProfile, const char* pBlockName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties); |
| 150 | + |
| 151 | +// Query the list of device extensions of a profile |
| 152 | +VPAPI_ATTR VkResult vpGetProfileDeviceExtensionProperties(const VpProfileProperties *pProfile, const char* pBlockName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties); |
| 153 | + |
| 154 | +// Fill the feature structures with the requirements of a profile |
| 155 | +VPAPI_ATTR VkResult vpGetProfileFeatures(const VpProfileProperties *pProfile, const char* pBlockName, void *pNext); |
| 156 | + |
| 157 | +// Query the list of feature structure types specified by the profile |
| 158 | +VPAPI_ATTR VkResult vpGetProfileFeatureStructureTypes(const VpProfileProperties *pProfile, const char* pBlockName, uint32_t *pStructureTypeCount, VkStructureType *pStructureTypes); |
| 159 | + |
| 160 | +// Fill the property structures with the requirements of a profile |
| 161 | +VPAPI_ATTR VkResult vpGetProfileProperties(const VpProfileProperties *pProfile, const char* pBlockName, void *pNext); |
| 162 | + |
| 163 | +// Query the list of property structure types specified by the profile |
| 164 | +VPAPI_ATTR VkResult vpGetProfilePropertyStructureTypes(const VpProfileProperties *pProfile, const char* pBlockName, uint32_t *pStructureTypeCount, VkStructureType *pStructureTypes); |
| 165 | + |
| 166 | +// Query the list of formats with specified requirements by a profile |
| 167 | +VPAPI_ATTR VkResult vpGetProfileFormats(const VpProfileProperties *pProfile, const char* pBlockName, uint32_t *pFormatCount, VkFormat *pFormats); |
| 168 | + |
| 169 | +// Query the requirements of a format for a profile |
| 170 | +VPAPI_ATTR VkResult vpGetProfileFormatProperties(const VpProfileProperties *pProfile, const char* pBlockName, VkFormat format, void *pNext); |
| 171 | + |
| 172 | +// Query the list of format structure types specified by the profile |
| 173 | +VPAPI_ATTR VkResult vpGetProfileFormatStructureTypes(const VpProfileProperties *pProfile, const char* pBlockName, uint32_t *pStructureTypeCount, VkStructureType *pStructureTypes); |
| 174 | + |
| 175 | +#ifdef __cplusplus |
| 176 | +} |
| 177 | +#endif |
| 178 | + |
| 179 | +#endif // VULKAN_PROFILES_H_ |
0 commit comments